Created
          February 29, 2024 20:31 
        
      - 
      
 - 
        
Save RolandHughes/84b7951bee1bb526df03c36e21834953 to your computer and use it in GitHub Desktop.  
    Snippet to test line range upload
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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 ) | |
| { | |
| if ( rep->error() == QNetworkReply::NoError ) | |
| { | |
| QByteArray data = rep->readAll(); | |
| displayGistPostSuccess( data ); | |
| } | |
| else | |
| { | |
| QString msg = QStringParser::formatArg( QString( "Error: %1 " ), rep->error() ); | |
| QMessageBox::warning( this, QString( "Github Gist Post error" ), msg ); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment