forked from qt-creator/qt-creator
Android: Rework settings dialog
Make it possible to create multiple AndroidConfigs so that we can have a different one in the settings dialog from the global one. Move pretty much every method from AndroidConfigurations to AndroidConfig, so that the settings dialog can work with its copy. Also add some additional logic to the settings page around the java setting. To start the avd manager we need both a sdk path and a java path. Also do some basic additional checking of the java path. Task-number: QTCREATORBUG-7724 Task-number: QTCREATORBUG-10936 Task-number: QTCREATORBUG-10937 Task-number: QTCREATORBUG-11059 Task-number: QTCREATORBUG-11218 Change-Id: I148c69b9c98a8a070d17d9b0e223d01db1750e69 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -69,12 +69,12 @@ public:
|
||||
AndroidSettingsWidget(QWidget *parent = 0);
|
||||
~AndroidSettingsWidget();
|
||||
|
||||
void saveSettings(bool saveNow = false);
|
||||
void saveSettings();
|
||||
|
||||
private slots:
|
||||
void sdkLocationEditingFinished();
|
||||
void ndkLocationEditingFinished();
|
||||
void searchForAnt(const QString &location);
|
||||
void searchForAnt(const Utils::FileName &location);
|
||||
void antLocationEditingFinished();
|
||||
void openJDKLocationEditingFinished();
|
||||
void browseSDKLocation();
|
||||
@@ -90,14 +90,20 @@ private slots:
|
||||
void createKitToggled();
|
||||
|
||||
private:
|
||||
void initGui();
|
||||
bool checkSDK(const Utils::FileName &location);
|
||||
bool checkNDK(const Utils::FileName &location);
|
||||
enum Mode { Sdk = 1, Ndk = 2, Java = 4, All = Sdk | Ndk | Java };
|
||||
enum State { NotSet = 0, Okay = 1, Error = 2 };
|
||||
void check(Mode mode);
|
||||
void applyToUi(Mode mode);
|
||||
|
||||
State m_sdkState;
|
||||
State m_ndkState;
|
||||
int m_ndkCompilerCount;
|
||||
QString m_ndkMissingQtArchs;
|
||||
State m_javaState;
|
||||
|
||||
Ui_AndroidSettingsWidget *m_ui;
|
||||
AndroidConfig m_androidConfig;
|
||||
AvdModel m_AVDModel;
|
||||
bool m_saveSettingsRequested;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user