Skip to content

Instantly share code, notes, and snippets.

View RolandHughes's full-sized avatar

Roland Hughes RolandHughes

View GitHub Profile
@RolandHughes
RolandHughes / sendToGitHubFinished.cpp
Created February 29, 2024 20:31
Snippet to test line range upload
void EdtBaseWidget::sendToGitHubFinished( )
{
// bit risky here but only way to do it.
// well, I could have hacked a lambda but that has its own issues.
//
QObject *p = sender();
QNetworkReply *rep = qobject_cast< QNetworkReply *>( p );
if ( rep != nullptr )
{
@RolandHughes
RolandHughes / handleSendToGitHubCommand.cpp
Last active February 29, 2024 16:47
Snippet from EdtBaseWidget called when [GOLD] 7 command of GIST issued
void EdtBaseWidget::handleSendToGitHubCommand( QString text )
{
QString rangeStr {text.mid( text.indexOf( ' ' ) ).trimmed()};
QString cmd {text.left( text.indexOf( ' ' ) ).trimmed()};
/*
* TODO:: Need to handle /PRI for private /PUB for public
* /NAM=somefile.nam
* /DESC="my description with spaces" or /DESC='my description with spaces'
*