diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-12-02 12:45:45 +0200 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-12-03 07:22:33 +0200 |
commit | 2f3aad559925bac456339d40728069852d021e8b (patch) | |
tree | bf684fd8118d2f50c37ff683a2fea5a45bdbca5f /src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp | |
parent | 82c8f7456c8cde31a83023a845332547bbaeaf20 (diff) |
Add "Do not show again" checkbox to import warning pop-ups
Make it possible to hide warnings when importing models. Warnings can be
enabled in studio preferences.
Change-Id: Id10d807054b16f2d886f331cb9659dfd987f98ae
Task-id: QT3DS-4019
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp')
-rw-r--r-- | src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp b/src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp index d8365a7e..93dc220c 100644 --- a/src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp +++ b/src/Authoring/Qt3DStudio/Workspace/Dialogs.cpp @@ -364,9 +364,11 @@ void CDialogs::DisplayImportFailed(const QUrl &inURL, const QString &inDescripti theMsgText += QStringLiteral("\n%1\n\n").arg(inURL.toDisplayString()) + theText; // Display the failed import resource message. - if (m_ShowGUI) { - Qt3DSMessageBox::Show(theTitle, theMsgText, Qt3DSMessageBox::ICON_WARNING, false, - g_StudioApp.m_pMainWnd); + if (m_ShowGUI && !CStudioPreferences::doNotShowImportWarnings()) { + bool doNotShowAgain = false; + Qt3DSMessageBox::Show(theTitle, theMsgText, Qt3DSMessageBox::ICON_WARNING, doNotShowAgain, + false, true, g_StudioApp.m_pMainWnd); + CStudioPreferences::setDoNotShowImportWarnings(doNotShowAgain); } else { qCDebug(qt3ds::TRACE_INFO) << theTitle << ": " << theMsgText; } |