diff options
| author | Tannin <devnull@localhost> | 2015-03-21 16:37:49 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-03-21 16:37:49 +0100 |
| commit | 4a2e4652f47b063e0a5a33ae7f45703140fc904f (patch) | |
| tree | 0168dada534a2dfd9de3a3cdabee84782e8a4383 /src | |
| parent | a9e1d44a2aada1972d4d42ce9cf2bb217fa3dab3 (diff) | |
- after closing the overwrite dialog the in-memory directory structure is updated again
- bugfix: crash on creating shortcuts
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 767f405c..1566bc8a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2274,6 +2274,7 @@ void MainWindow::overwriteClosed(int) m_OrganizerCore.modList()->modInfoChanged(dialog->modInfo());
dialog->deleteLater();
}
+ m_OrganizerCore.refreshDirectoryStructure();
}
@@ -3196,9 +3197,8 @@ void MainWindow::linkToolbar() void MainWindow::linkDesktop()
{
- QComboBox* executablesList = findChild<QComboBox*>("executablesListBox");
-
- const Executable &selectedExecutable = executablesList->itemData(executablesList->currentIndex()).value<Executable>();
+ const Executable &selectedExecutable =
+ ui->executablesListBox->itemData(ui->executablesListBox->currentIndex()).value<Executable>();
QString linkName = getDesktopDirectory() + "\\" + selectedExecutable.m_Title + ".lnk";
if (QFile::exists(linkName)) {
@@ -3208,7 +3208,7 @@ void MainWindow::linkDesktop() reportError(tr("failed to remove %1").arg(linkName));
}
} else {
- QFileInfo exeInfo(qApp->arguments().at(0));
+ QFileInfo exeInfo(qApp->applicationFilePath());
// create link
std::wstring targetFile = ToWString(exeInfo.absoluteFilePath());
std::wstring parameter = ToWString(QString("\"%1\" %2").arg(QDir::toNativeSeparators(selectedExecutable.m_BinaryInfo.absoluteFilePath()))
@@ -3242,7 +3242,7 @@ void MainWindow::linkMenu() reportError(tr("failed to remove %1").arg(linkName));
}
} else {
- QFileInfo exeInfo(qApp->arguments().at(0));
+ QFileInfo exeInfo(qApp->applicationFilePath());
// create link
std::wstring targetFile = ToWString(exeInfo.absoluteFilePath());
std::wstring parameter = ToWString(QString("\"%1\" %2").arg(QDir::toNativeSeparators(selectedExecutable.m_BinaryInfo.absoluteFilePath()))
|
