CMake: Fix progress calculation in server-mode

Add unit test to make sure this stays fixed.

Task-number: QTCREATORBUG-18624
Change-Id: Ieeb41982418481223d9ebf8f5c6ec4b3b78bfe00
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2017-07-24 12:53:12 +02:00
parent 2a06ec7da3
commit 336f54def4
3 changed files with 76 additions and 2 deletions

View File

@@ -67,6 +67,10 @@ private:
void handleProgress(int min, int cur, int max, const QString &inReplyTo);
void handleSignal(const QString &signal, const QVariantMap &data);
int calculateProgress(const int minRange, const int min,
const int cur,
const int max, const int maxRange);
struct Target;
struct Project;
@@ -151,6 +155,10 @@ private:
QList<FileGroup *> m_fileGroups;
CMakeParser m_parser;
#if defined(WITH_TESTS)
friend class CMakeProjectPlugin;
#endif
};
} // namespace Internal