Cdb: Store pending commands in an Hash.

Use the command token as the key. Simplifies the CdbCommand,
because the command token doesn't need to be stored in the class.

Change-Id: Ic43ba16529db6e11ce00db1db49b384a627a4941
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
David Schulz
2015-08-14 10:30:15 +02:00
parent d582b73a64
commit 2763704bee
2 changed files with 18 additions and 37 deletions

View File

@@ -245,7 +245,7 @@ private:
SpecialStopMode m_specialStopMode;
ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation;
int m_nextCommandToken;
QList<CdbCommandPtr> m_commandQueue;
QHash<int, CdbCommandPtr> m_commandForToken;
QByteArray m_currentBuiltinResponse;
int m_currentBuiltinResponseToken;
QMap<QString, NormalizedSourceFileName> m_normalizedFileCache;