summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-18 21:16:40 +0100
committerGitHub <noreply@github.com>2021-01-18 21:16:40 +0100
commitee44a38c986d953a19cbb37b0297590844cf54ac (patch)
treee39b12f7cb7f37cd96b3c3f451d2b527a81d4578 /src/organizercore.cpp
parent59f055ba93381b965cdc04557ac1dce2df36bd07 (diff)
parent6feab2ea8f96704e44a14c212a635dc17f4ba71e (diff)
Merge pull request #1354 from isanae/startup-rework
Startup rework
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index e95aa565..d3e817a5 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -346,25 +346,6 @@ void OrganizerCore::profileRemoved(QString const& profileName)
m_ProfileRemoved(profileName);
}
-
-void OrganizerCore::externalMessage(const QString &message)
-{
- MOShortcut moshortcut(message);
-
- if (moshortcut.isValid()) {
- if(moshortcut.hasExecutable()) {
- processRunner()
- .setFromShortcut(moshortcut)
- .setWaitForCompletion(ProcessRunner::Refresh)
- .run();
- }
- }
- else if (isNxmLink(message)) {
- MessageDialog::showMessage(tr("Download started"), qApp->activeWindow());
- downloadRequestedNXM(message);
- }
-}
-
void OrganizerCore::downloadRequested(QNetworkReply *reply, QString gameName, int modID,
const QString &fileName)
{
@@ -579,6 +560,10 @@ void OrganizerCore::setCurrentProfile(const QString &profileName)
profileBaseDir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot).at(0));
log::error("picked profile '{}' instead", QDir(profileDir).dirName());
+
+ reportError(
+ tr("The selected profile '%1' does not exist. The profile '%2' will be used instead")
+ .arg(profileName).arg(QDir(profileDir).dirName()));
}
// Keep the old profile to emit signal-changed:
@@ -826,7 +811,7 @@ ModInfo::Ptr OrganizerCore::installDownload(int index, int priority)
}
}
} catch (const std::exception &e) {
- reportError(e.what());
+ reportError(QString(e.what()));
}
return nullptr;
@@ -1911,8 +1896,6 @@ bool OrganizerCore::beforeRun(
void OrganizerCore::afterRun(const QFileInfo& binary, DWORD exitCode)
{
- refreshDirectoryStructure();
-
// need to remove our stored load order because it may be outdated if a
// foreign tool changed the file time. After removing that file,
// refreshESPList will use the file time as the order
@@ -1927,7 +1910,7 @@ void OrganizerCore::afterRun(const QFileInfo& binary, DWORD exitCode)
savePluginList();
cycleDiagnostics();
- //These callbacks should not fiddle with directoy structure and ESPs.
+ //These callbacks should not fiddle with directory structure and ESPs.
m_FinishedRun(binary.absoluteFilePath(), exitCode);
}