forked from qt-creator/qt-creator
Gerrit: Terminate previous query when remote is changed
Change-Id: Ifafaa9068dca069562973151361e653f6db3617e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
4b38b09a81
commit
7e8bac1512
@@ -230,6 +230,7 @@ public:
|
|||||||
|
|
||||||
~QueryContext();
|
~QueryContext();
|
||||||
void start();
|
void start();
|
||||||
|
void terminate();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void resultRetrieved(const QByteArray &);
|
void resultRetrieved(const QByteArray &);
|
||||||
@@ -242,7 +243,6 @@ private:
|
|||||||
void timeout();
|
void timeout();
|
||||||
|
|
||||||
void errorTermination(const QString &msg);
|
void errorTermination(const QString &msg);
|
||||||
void terminate();
|
|
||||||
|
|
||||||
QProcess m_process;
|
QProcess m_process;
|
||||||
QTimer m_timer;
|
QTimer m_timer;
|
||||||
@@ -498,10 +498,8 @@ QStandardItem *GerritModel::itemForNumber(int number) const
|
|||||||
|
|
||||||
void GerritModel::refresh(const QSharedPointer<GerritServer> &server, const QString &query)
|
void GerritModel::refresh(const QSharedPointer<GerritServer> &server, const QString &query)
|
||||||
{
|
{
|
||||||
if (m_query) {
|
if (m_query)
|
||||||
qWarning("%s: Another query is still running", Q_FUNC_INFO);
|
m_query->terminate();
|
||||||
return;
|
|
||||||
}
|
|
||||||
clearData();
|
clearData();
|
||||||
m_server = server;
|
m_server = server;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user