Commit 22fe8806 authored by Samuel Gaist's avatar Samuel Gaist
Browse files

Improve AndroidManifest.xml error dialog content

Currently, if the AndroidManifest.xml file is not present in the
installation folder (e.g. failed make install), the error message
shown to the user just tells him that some operation failed. This patch
tries to be more verbose to give the user some clues for the failure

Task-number: QTCREATORBUG-11503
Change-Id: I013de394c87b3adb53ec86dd97433567d7f63049
Reviewed-by: default avatarDaniel Teske <>
parent f130c3c7
......@@ -213,14 +213,21 @@ void CreateAndroidManifestWizard::setDirectory(const QString &directory)
m_directory = directory;
QString CreateAndroidManifestWizard::sourceFileName() const
QString CreateAndroidManifestWizard::sourceFolder() const
QString result;
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(m_target->kit());
if (!version)
return result;
return QString();
return version->qmakeProperty("QT_INSTALL_PREFIX");
QString CreateAndroidManifestWizard::sourceFileName() const
QString srcFolder = sourceFolder();
if (srcFolder.isEmpty())
return srcFolder;
Utils::FileName srcPath
= Utils::FileName::fromString(version->qmakeProperty("QT_INSTALL_PREFIX"))
= Utils::FileName::fromString(srcFolder)
return srcPath.toString();
......@@ -250,9 +257,20 @@ void CreateAndroidManifestWizard::createAndroidManifestFile()
if (!QFile::copy(sourceFileName(), fileName)) {
QString srcFileName = sourceFileName();
if (!QFileInfo(srcFileName).exists()) {
QMessageBox::warning(this, tr("File Creation Error"),
tr("\"%1\" is missing.\n"
"Check your Qt installation here:\n"
if (!QFile::copy(srcFileName, fileName)) {
QMessageBox::warning(this, tr("File Creation Error"),
tr("Could not create file %1.").arg(fileName));
tr("Could not create file %1.\n"
"Verify that you have writing rights in your project directory.").arg(fileName));
......@@ -92,6 +92,7 @@ public:
QmakeProjectManager::QmakeProFileNode *node() const;
void setNode(QmakeProjectManager::QmakeProFileNode *node);
QString sourceFolder() const;
QString sourceFileName() const;
void accept();
Supports Markdown
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