diff options
author | Daniel Teske <daniel.teske@digia.com> | 2013-07-05 13:09:06 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2013-07-08 11:48:23 +0200 |
commit | 5948bcf328c26079662a8955f9ecfe990acd7ab7 (patch) | |
tree | f6a6781abee6ebf591bd8de58727282488822ef8 /src | |
parent | b830444e24af3272082bf77ef2dfa1903ce74e05 (diff) | |
download | qt-creator-5948bcf328c26079662a8955f9ecfe990acd7ab7.tar.gz |
AndroidSettingsWidget: Don't show a message box for wrong settings
I believe this is responsible for the crash reported in
Task-number: QTCREATORBUG-9724
Change-Id: Id5721e46b9dc9587ff8423cd3d5e6aa9107e7dba
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/android/androidsettingswidget.cpp | 7 | ||||
-rw-r--r-- | src/plugins/android/androidsettingswidget.ui | 142 |
2 files changed, 97 insertions, 52 deletions
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 2cbbbdc6fa..73e25163bf 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -186,8 +186,13 @@ bool AndroidSettingsWidget::checkSDK(const Utils::FileName &location) || (!androidExe.appendPath(QLatin1String("/tools/android" QTC_HOST_EXE_SUFFIX)).toFileInfo().exists() && !androidBat.appendPath(QLatin1String("/tools/android" ANDROID_BAT_SUFFIX)).toFileInfo().exists()) || !emulator.appendPath(QLatin1String("/tools/emulator" QTC_HOST_EXE_SUFFIX)).toFileInfo().exists()) { - QMessageBox::critical(this, tr("Android SDK Folder"), tr("\"%1\" does not seem to be an Android SDK top folder.").arg(location.toUserOutput())); + m_ui->sdkWarningIconLabel->setVisible(true); + m_ui->sdkWarningLabel->setVisible(true); + m_ui->sdkWarningLabel->setText(tr("\"%1\" does not seem to be an Android SDK top folder.").arg(location.toUserOutput())); return false; + } else { + m_ui->sdkWarningIconLabel->setVisible(false); + m_ui->sdkWarningLabel->setVisible(false); } return true; } diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index d1fb9f0727..4c4c1d8bd0 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -33,7 +33,11 @@ </widget> </item> <item row="0" column="1"> - <widget class="QLineEdit" name="SDKLocationLineEdit"/> + <widget class="QLineEdit" name="SDKLocationLineEdit"> + <property name="text"> + <string/> + </property> + </widget> </item> <item row="0" column="2"> <widget class="QPushButton" name="SDKLocationPushButton"> @@ -48,7 +52,43 @@ </property> </widget> </item> - <item row="1" column="0"> + <item row="1" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QLabel" name="sdkWarningIconLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="sdkWarningLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0"> <widget class="QLabel" name="NDKLocationLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> @@ -64,17 +104,17 @@ </property> </widget> </item> - <item row="1" column="1"> + <item row="2" column="1"> <widget class="QLineEdit" name="NDKLocationLineEdit"/> </item> - <item row="1" column="2"> + <item row="2" column="2"> <widget class="QPushButton" name="NDKLocationPushButton"> <property name="text"> <string>Browse</string> </property> </widget> </item> - <item row="2" column="1"> + <item row="3" column="1"> <layout class="QHBoxLayout" name="horizontalLayout_3"> <property name="spacing"> <number>2</number> @@ -110,7 +150,7 @@ </item> </layout> </item> - <item row="3" column="1"> + <item row="4" column="1"> <widget class="QCheckBox" name="CreateKitCheckBox"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> @@ -126,7 +166,46 @@ </property> </widget> </item> - <item row="5" column="0"> + <item row="5" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>2</number> + </property> + <item> + <widget class="QLabel" name="kitWarningIconLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="kitWarningLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item row="6" column="0"> <widget class="QLabel" name="AntLocationLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> @@ -142,17 +221,17 @@ </property> </widget> </item> - <item row="5" column="1"> + <item row="6" column="1"> <widget class="QLineEdit" name="AntLocationLineEdit"/> </item> - <item row="5" column="2"> + <item row="6" column="2"> <widget class="QPushButton" name="AntLocationPushButton"> <property name="text"> <string>Browse</string> </property> </widget> </item> - <item row="6" column="0"> + <item row="7" column="0"> <widget class="QLabel" name="OpenJDKLocationLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> @@ -168,55 +247,16 @@ </property> </widget> </item> - <item row="6" column="1"> + <item row="7" column="1"> <widget class="QLineEdit" name="OpenJDKLocationLineEdit"/> </item> - <item row="6" column="2"> + <item row="7" column="2"> <widget class="QPushButton" name="OpenJDKLocationPushButton"> <property name="text"> <string>Browse</string> </property> </widget> </item> - <item row="4" column="1"> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="spacing"> - <number>2</number> - </property> - <item> - <widget class="QLabel" name="kitWarningIconLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="kitWarningLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </item> </layout> </item> <item> |