forked from qt-creator/qt-creator
CPaster: Do not fail to paste after connection check
dpaste allows one request per second, but we perform a connection check before sending the paste request. This happens too fast and lets the paste fail for the first time. Skip the configuration check as the user gets an error message if it fails. Fixes: QTCREATORBUG-26717 Change-Id: I5661055c0d3ed0894db170c0570a7501af34214e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -140,11 +140,10 @@ void DPasteDotComProtocol::paste(
|
||||
});
|
||||
}
|
||||
|
||||
bool DPasteDotComProtocol::checkConfiguration(QString *errorMessage)
|
||||
bool DPasteDotComProtocol::checkConfiguration(QString * /*errorMessage*/)
|
||||
{
|
||||
if (!m_hostKnownOk)
|
||||
m_hostKnownOk = httpStatus(baseUrl(), errorMessage);
|
||||
return m_hostKnownOk;
|
||||
// we need a 1s gap between requests, so skip status check to avoid failing
|
||||
return true;
|
||||
}
|
||||
|
||||
void DPasteDotComProtocol::reportError(const QString &message)
|
||||
|
@@ -51,8 +51,6 @@ private:
|
||||
bool checkConfiguration(QString *errorMessage) override;
|
||||
|
||||
static void reportError(const QString &message);
|
||||
|
||||
bool m_hostKnownOk = false;
|
||||
};
|
||||
|
||||
} // namespace CodePaster
|
||||
|
Reference in New Issue
Block a user