From 30d80ad020e0e6c973a77f714b8d02360a60b82e Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 25 Feb 2015 08:33:49 +0100 Subject: [PATCH] Use completeBaseName for operations on paths. Task-number: QTCREATORBUG-13967 Change-Id: Ie70f861138f1cf4c3f098a363274cb99bcf97c03 Reviewed-by: Friedemann Kleint --- .../qmakeprojectmanager/librarydetailscontroller.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp index 09790d4d299..fd8761b47e8 100644 --- a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp +++ b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp @@ -753,7 +753,7 @@ void NonInternalLibraryDetailsController::slotLibraryPathChanged() if (parentFolderName != QLatin1String("debug") && parentFolderName != QLatin1String("release")) subfoldersEnabled = false; - const QString baseName = fi.baseName(); + const QString baseName = fi.completeBaseName(); if (baseName.isEmpty() || baseName.at(baseName.size() - 1).toLower() != QLatin1Char('d')) removeSuffixEnabled = false; @@ -786,18 +786,18 @@ QString NonInternalLibraryDetailsController::snippet() const const bool removeSuffix = isWindowsGroupVisible() && libraryDetailsWidget()->removeSuffixCheckBox->isChecked(); if (creatorPlatform() == CreatorWindows) { - libName = fi.baseName(); + libName = fi.completeBaseName(); if (removeSuffix && !libName.isEmpty()) // remove last letter which needs to be "d" libName = libName.left(libName.size() - 1); if (fi.completeSuffix() == QLatin1String("a")) // the mingw lib case libName = libName.mid(3); // cut the "lib" prefix } else if (creatorPlatform() == CreatorMac) { if (macLibraryType() == AddLibraryWizard::FrameworkType) - libName = fi.baseName(); + libName = fi.completeBaseName(); else - libName = fi.baseName().mid(3); // cut the "lib" prefix + libName = fi.completeBaseName().mid(3); // cut the "lib" prefix } else { - libName = fi.baseName().mid(3); // cut the "lib" prefix + libName = fi.completeBaseName().mid(3); // cut the "lib" prefix } QString targetRelativePath; @@ -946,7 +946,7 @@ void ExternalLibraryDetailsController::updateWindowsOptionsEnablement() if (parentFolderName != QLatin1String("debug") && parentFolderName != QLatin1String("release")) subfoldersEnabled = false; - const QString baseName = fi.baseName(); + const QString baseName = fi.completeBaseName(); if (baseName.isEmpty() || baseName.at(baseName.size() - 1).toLower() != QLatin1Char('d')) removeSuffixEnabled = false;