Commit 90ff4c1c authored by Christian Kandeler's avatar Christian Kandeler
Browse files

MeeGo: Fix message box for adding packaging files.

Task-number: QTCREATORBUG-5189

Change-Id: I1123a578aca1d5f0e491bbcef16d9e5672290a5c
Reviewed-on: http://codereview.qt.nokia.com/1422

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent b7d453b0
......@@ -331,15 +331,20 @@ AbstractQt4MaemoTarget::ActionStatus AbstractQt4MaemoTarget::createTemplates()
return ActionFailed;
if (actionStatus == ActionSuccessful) {
const QStringList &files = packagingFilePaths();
QMessageBox::StandardButton button
= QMessageBox::question(Core::ICore::instance()->mainWindow(),
tr("Add Packaging Files to Project"),
tr("Qt Creator has set up the following files to enable "
"packaging:\n %1\nDo you want to add them to the project?")
.arg(files.join(QLatin1String("\n "))),
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes)
ProjectExplorer::ProjectExplorerPlugin::instance()->addExistingFiles(project()->rootProjectNode(), files);
if (!files.isEmpty()) {
const QString list = QLatin1String("<ul><li>")
+ files.join(QLatin1String("</li><li>")) + QLatin1String("</li></ul>");
QMessageBox::StandardButton button
= QMessageBox::question(Core::ICore::instance()->mainWindow(),
tr("Add Packaging Files to Project"),
tr("<html>Qt Creator has set up the following files to enable "
"packaging:\n %1\nDo you want to add them to the project?</html>")
.arg(list), QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
ProjectExplorer::ProjectExplorerPlugin::instance()
->addExistingFiles(project()->rootProjectNode(), files);
}
}
}
return actionStatus;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment