Android: Reduce time to open settings widget

Two major areas of improvement:
- Make connections last, so that the initial setup does not trigger any
  unnecessary checks.
- Make fetching the list of android virtual devices a background
  operation.

Together they reduce the time needed to open the settings for me by
roughly 10 times.

Task-number: QTCREATORBUG-13735
Change-Id: I0839853dcdbdfe20a183a27888e55d3c56a9b815
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2015-01-08 17:05:09 +01:00
parent 8a29109fe9
commit ab372deb1f
5 changed files with 75 additions and 77 deletions

View File

@@ -96,6 +96,7 @@ private slots:
void checkGdbFinished();
void showGdbWarningDialog();
void updateAvds();
private:
enum Mode { Sdk = 1, Ndk = 2, Java = 4, All = Sdk | Ndk | Java };
@@ -104,6 +105,9 @@ private:
void applyToUi(Mode mode);
bool sdkLocationIsValid() const;
bool sdkPlatformToolsInstalled() const;
void startUpdateAvd();
void enableAvdControls();
void disableAvdControls();
State m_sdkState;
State m_ndkState;
@@ -118,6 +122,9 @@ private:
QFutureWatcher<AndroidConfig::CreateAvdInfo> m_futureWatcher;
QFutureWatcher<QPair<QStringList, bool>> m_checkGdbWatcher;
QStringList m_gdbCheckPaths;
QFutureWatcher<QVector<AndroidDeviceInfo>> m_virtualDevicesWatcher;
QString m_lastAddedAvd;
};
} // namespace Internal