diff options
author | kh1 <qt-info@nokia.com> | 2011-03-30 15:18:21 +0200 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2011-03-30 15:18:21 +0200 |
commit | 5fb9e4cd8488e67315df18fad585dedf3aeb9be8 (patch) | |
tree | ee98c73d6e91a5498ef8dd3fc8e8f1085b30ba70 /installerbuilder/installerbase/installerbasecommons.cpp | |
parent | a5507f265067a1268b29a204bf356d1951dc3be6 (diff) | |
parent | ca229bc660b7367c94022aea8fa8fc7b4c5b38dd (diff) |
Merge branch 'master' into refactor
Conflicts:
examples/testapp/testapp.pro
installerbuilder/installerbase/installerbasecommons.cpp
installerbuilder/libinstaller/qinstaller.cpp
installerbuilder/tests/tests.pro
Diffstat (limited to 'installerbuilder/installerbase/installerbasecommons.cpp')
-rw-r--r-- | installerbuilder/installerbase/installerbasecommons.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/installerbuilder/installerbase/installerbasecommons.cpp b/installerbuilder/installerbase/installerbasecommons.cpp index c82574d5a..cb29359bb 100644 --- a/installerbuilder/installerbase/installerbasecommons.cpp +++ b/installerbuilder/installerbase/installerbasecommons.cpp @@ -225,6 +225,17 @@ bool TargetDirectoryPageImpl::validatePage() if (!isVisible()) return true; + if (targetDir().isEmpty()) { + MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(), + QLatin1String("forbiddenTargetDirectory"), tr("Error"), + tr( "The install directory cannot be empty, please specify a valid folder"), QMessageBox::Ok); + return false; + } + + QString remove = installer()->value(QLatin1String("RemoveTargetDir")); + if (!QVariant(remove).toBool()) + return true; + if (QFileInfo(targetDir()).isDir()) { QFileInfo fi2(targetDir() + QDir::separator() + installer()->uninstallerName()); if (QDir(targetDir()) == QDir::root()) { |