From fc920e0a39f231ddebdb75a8df931c93da668e37 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 4 Oct 2016 19:27:29 +0200 Subject: [PATCH] Changed: Delete old profiles shortcuts (in case where they are renamed) --- .../tools/client/ryzom_installer/src/operationdialog.cpp | 5 ++++- code/ryzom/tools/client/ryzom_installer/src/utils.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 7391ec148..d5e83037c 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -237,6 +237,9 @@ void COperationDialog::updateAddRemoveComponents() // remove profiles that didn't exist profilesToAdd.removeAll(profile.id); + + // delete all shortcuts, we'll recreate them later + profile.deleteShortcuts(); } const CServer &defaultServer = config->getServer(); @@ -360,7 +363,7 @@ void COperationDialog::processUpdateProfilesNextStep() } } - // recreate shortcuts + // recreate all shortcuts foreach(const CProfile &profile, config->getProfiles()) { profile.createShortcuts(); diff --git a/code/ryzom/tools/client/ryzom_installer/src/utils.cpp b/code/ryzom/tools/client/ryzom_installer/src/utils.cpp index 6c61e0f8f..c2789f180 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/utils.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/utils.cpp @@ -169,6 +169,12 @@ bool createShortcut(const QString &shortcut, const QString &name, const QString // Save the link by calling IPersistFile::Save. hres = ppf->Save(qToWide(QDir::toNativeSeparators(path)), TRUE); + + if (FAILED(hres)) + { + qDebug() << "Unable to create shortcut" << path; + } + ppf->Release(); }