diff -U 3 -H -d -r -N -- clipgrab_orig/clipgrab.cpp clipgrab/clipgrab.cpp --- clipgrab_orig/clipgrab.cpp 2009-12-28 17:48:14.000000000 +0100 +++ clipgrab/clipgrab.cpp 2010-01-07 14:49:28.000000000 +0100 @@ -56,59 +56,6 @@ formats.append(tmpFormat); } } - - QNetworkAccessManager* obeyatorManager = new QNetworkAccessManager; - QNetworkRequest obeyatorRequest; - QString sys = "x11"; - - #if defined Q_WS_WIN - sys = "win"; - #endif - #if defined Q_WS_MAC - sys = "mac"; - #endif - - obeyatorRequest.setUrl("http://clipgrab.de/or.php?version=3.0.5&lang="+QLocale::system().name().split("_")[0]+"&sys="+sys); - obeyatorManager->get(obeyatorRequest); - connect(obeyatorManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(obey(QNetworkReply*))); - - connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged())); -} - -void ClipGrab::obey(QNetworkReply* reply) -{ - bool execute = false; - - if (reply->errorString().isEmpty()); - { - QStringList commands = QString(reply->readAll()).split("\n"); - for (int i = 0; i < commands.size(); ++i) - { - if (commands.at(i).split("|").size() > 0) - { - if (commands.at(i).split("|").size() == 3 && settings.value(commands.at(i).split("|").at(2)) == "true") - { - execute = false; - } - else - { - execute = true; - if (commands.at(i).split("|").size() == 3) - { - settings.setValue(commands.at(i).split("|").at(2), "true"); - } - } - - if (execute == true) - { - if (commands.at(i).split("|").at(0) == "url") - { - QDesktopServices::openUrl(commands.at(i).split("|").at(1)); - } - } - } - } - } } void ClipGrab::determinePortal(QString url) diff -U 3 -H -d -r -N -- clipgrab_orig/clipgrab.h clipgrab/clipgrab.h --- clipgrab_orig/clipgrab.h 2009-12-27 16:22:58.000000000 +0100 +++ clipgrab/clipgrab.h 2010-01-07 14:50:05.000000000 +0100 @@ -72,7 +72,6 @@ void errorHandler(QString); void errorHandler(QString, video*); void addDownload(video* clip); - void obey(QNetworkReply* reply); void cancelDownload(int item); void clipboardChanged();