mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-25 23:06:23 +02:00
Don't hardcode submission url in the CrashReporter class
This commit is contained in:
@@ -30,7 +30,8 @@
|
|||||||
#define RESPATH ":/data/"
|
#define RESPATH ":/data/"
|
||||||
|
|
||||||
|
|
||||||
CrashReporter::CrashReporter( const QStringList& args )
|
CrashReporter::CrashReporter( const QUrl& url, const QStringList& args )
|
||||||
|
: m_url( url )
|
||||||
{
|
{
|
||||||
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ CrashReporter::CrashReporter( const QStringList& args )
|
|||||||
ui.bottomLabel->setIndent( 1 );
|
ui.bottomLabel->setIndent( 1 );
|
||||||
#endif //Q_OS_MAC
|
#endif //Q_OS_MAC
|
||||||
|
|
||||||
m_request = new QNetworkRequest( QUrl( "http://oops.tomahawk-player.org/addreport.php" ) );
|
m_request = new QNetworkRequest( m_url );
|
||||||
|
|
||||||
m_dir = args.value( 1 );
|
m_dir = args.value( 1 );
|
||||||
m_minidump = m_dir + '/' + args.value( 2 ) + ".dmp";
|
m_minidump = m_dir + '/' + args.value( 2 ) + ".dmp";
|
||||||
|
@@ -32,7 +32,7 @@ class CrashReporter : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CrashReporter( const QStringList& argv );
|
CrashReporter( const QUrl& url, const QStringList& argv );
|
||||||
virtual ~CrashReporter( );
|
virtual ~CrashReporter( );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -43,6 +43,7 @@ private:
|
|||||||
QString m_product_name;
|
QString m_product_name;
|
||||||
QNetworkRequest* m_request;
|
QNetworkRequest* m_request;
|
||||||
QNetworkReply* m_reply;
|
QNetworkReply* m_reply;
|
||||||
|
QUrl m_url;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void send();
|
void send();
|
||||||
|
@@ -45,7 +45,7 @@ int main( int argc, char* argv[] )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CrashReporter reporter( app.arguments() );
|
CrashReporter reporter( QUrl( "http://oops.tomahawk-player.org/addreport.php" ), app.arguments() );
|
||||||
reporter.show();
|
reporter.show();
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
Reference in New Issue
Block a user