From 89c071f2bff8f2de1018464f637d59d18cf4e8a0 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Wed, 13 May 2020 11:33:31 +0200 Subject: [PATCH] PublicKeyDeploymentDialog: Make theme-aware Change-Id: Id7af63d4bfafeb22fe266c88555a54a04135de86 Reviewed-by: Christian Kandeler Reviewed-by: Alessandro Portale --- src/plugins/remotelinux/publickeydeploymentdialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/remotelinux/publickeydeploymentdialog.cpp b/src/plugins/remotelinux/publickeydeploymentdialog.cpp index 9d31ea580dc..6cf31ed16aa 100644 --- a/src/plugins/remotelinux/publickeydeploymentdialog.cpp +++ b/src/plugins/remotelinux/publickeydeploymentdialog.cpp @@ -29,6 +29,7 @@ #include #include +#include #include @@ -100,16 +101,15 @@ void PublicKeyDeploymentDialog::handleDeploymentError(const QString &errorMsg) void PublicKeyDeploymentDialog::handleDeploymentFinished(const QString &errorMsg) { QString buttonText; - const char *textColor; + QString textColor; if (errorMsg.isEmpty()) { buttonText = tr("Deployment finished successfully."); - textColor = "blue"; + textColor = Utils::creatorTheme()->color(Utils::Theme::TextColorNormal).name(); } else { buttonText = errorMsg; - textColor = "red"; + textColor = Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(); } - setLabelText(QString::fromLatin1("%2").arg(QLatin1String(textColor), - buttonText)); + setLabelText(QString::fromLatin1("%2").arg(textColor, buttonText)); setCancelButtonText(tr("Close")); }