Commit 702fd2e6 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CPaster: Use Qt5-style connect

Change-Id: I22cbec892d1f0cd347929308f6aab40d9483fd88
Reviewed-by: Friedemann Kleint's avatarFriedemann Kleint <Friedemann.Kleint@qt.io>
parent 928ba8aa
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
qApp->exit(EXIT_FAILURE); qApp->exit(EXIT_FAILURE);
return; return;
} }
connect(m_protocol.data(), SIGNAL(pasteDone(QString)), SLOT(handlePasteDone(QString))); connect(m_protocol.data(), &Protocol::pasteDone, this, &PasteReceiver::handlePasteDone);
m_protocol->paste(content); m_protocol->paste(content);
} }
...@@ -113,7 +113,7 @@ int main(int argc, char *argv[]) ...@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS; return EXIT_SUCCESS;
case ArgumentsCollector::RequestTypePaste: { case ArgumentsCollector::RequestTypePaste: {
PasteReceiver pr(argsCollector.protocol(), argsCollector.inputFilePath()); PasteReceiver pr(argsCollector.protocol(), argsCollector.inputFilePath());
QTimer::singleShot(0, &pr, SLOT(paste())); QTimer::singleShot(0, &pr, &PasteReceiver::paste);
return app.exec(); return app.exec();
} }
} }
......
...@@ -209,7 +209,7 @@ bool NetworkProtocol::httpStatus(QString url, QString *errorMessage, bool useHtt ...@@ -209,7 +209,7 @@ bool NetworkProtocol::httpStatus(QString url, QString *errorMessage, bool useHtt
tr("Connecting to %1...").arg(url), tr("Connecting to %1...").arg(url),
QMessageBox::Cancel, QMessageBox::Cancel,
Core::ICore::mainWindow()); Core::ICore::mainWindow());
connect(reply.data(), SIGNAL(finished()), &box, SLOT(close())); connect(reply.data(), &QNetworkReply::finished, &box, &QWidget::close);
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
box.exec(); box.exec();
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment