Build aspects: Fix some UI glitches

Add missing colons, hide empty labels.

Change-Id: Ic9753044d8dc842105d89225df45978220b0d8da
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-11-28 13:41:06 +01:00
parent e6e9f4017d
commit 1492284241
2 changed files with 9 additions and 7 deletions

View File

@@ -129,7 +129,7 @@ void BuildDirectoryAspect::updateProblemLabel()
SeparateDebugInfoAspect::SeparateDebugInfoAspect() SeparateDebugInfoAspect::SeparateDebugInfoAspect()
{ {
setDisplayName(tr("Separate Debug Info")); setDisplayName(tr("Separate Debug Info:"));
setSettingsKey("SeparateDebugInfo"); setSettingsKey("SeparateDebugInfo");
} }

View File

@@ -41,7 +41,7 @@ namespace QtSupport {
QmlDebuggingAspect::QmlDebuggingAspect() QmlDebuggingAspect::QmlDebuggingAspect()
{ {
setSettingsKey("EnableQmlDebugging"); setSettingsKey("EnableQmlDebugging");
setDisplayName(tr("QML debugging and profiling")); setDisplayName(tr("QML debugging and profiling:"));
} }
void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder) void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder)
@@ -64,8 +64,9 @@ void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder)
} }
warningTextLabel->setText(warningText); warningTextLabel->setText(warningText);
setVisibleDynamic(supported); setVisibleDynamic(supported);
warningIconLabel->setVisible(supported && !warningText.isEmpty()); const bool warningLabelsVisible = supported && !warningText.isEmpty();
warningTextLabel->setVisible(supported); warningIconLabel->setVisible(warningLabelsVisible);
warningTextLabel->setVisible(warningLabelsVisible);
}; };
connect(KitManager::instance(), &KitManager::kitsChanged, builder.layout(), changeHandler); connect(KitManager::instance(), &KitManager::kitsChanged, builder.layout(), changeHandler);
connect(this, &QmlDebuggingAspect::changed, builder.layout(), changeHandler); connect(this, &QmlDebuggingAspect::changed, builder.layout(), changeHandler);
@@ -75,7 +76,7 @@ void QmlDebuggingAspect::addToLayout(LayoutBuilder &builder)
QtQuickCompilerAspect::QtQuickCompilerAspect() QtQuickCompilerAspect::QtQuickCompilerAspect()
{ {
setSettingsKey("QtQuickCompiler"); setSettingsKey("QtQuickCompiler");
setDisplayName(tr("Qt Quick Compiler")); setDisplayName(tr("Qt Quick Compiler:"));
} }
void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder) void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder)
@@ -99,8 +100,9 @@ void QtQuickCompilerAspect::addToLayout(LayoutBuilder &builder)
} }
warningTextLabel->setText(warningText); warningTextLabel->setText(warningText);
setVisibleDynamic(supported); setVisibleDynamic(supported);
warningIconLabel->setVisible(supported && !warningText.isEmpty()); const bool warningLabelsVisible = supported && !warningText.isEmpty();
warningTextLabel->setVisible(supported); warningIconLabel->setVisible(warningLabelsVisible);
warningTextLabel->setVisible(warningLabelsVisible);
}; };
connect(KitManager::instance(), &KitManager::kitsChanged, builder.layout(), changeHandler); connect(KitManager::instance(), &KitManager::kitsChanged, builder.layout(), changeHandler);
connect(this, &QmlDebuggingAspect::changed, builder.layout(), changeHandler); connect(this, &QmlDebuggingAspect::changed, builder.layout(), changeHandler);