summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-01-29 21:06:55 +0100
committerTannin <devnull@localhost>2014-01-29 21:06:55 +0100
commit48c944c737a0e277c3ac85c10008031f39cbc04c (patch)
tree441446876a7a759f4d2febea5f8f0368e3874170 /src
parentaf50eedbe275062eda933ccc200be66a9d3ee94d (diff)
- bugfix: elevation dialog didn't offer a "yes" option
- bugfix: python plugins crashed the application when trying to create a nexus bridge - bugfix: python plugins couldn't register for failed requests correctly
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp12
-rw-r--r--src/spawn.cpp5
2 files changed, 9 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ce2c02b6..cc7fbb09 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1046,9 +1046,9 @@ bool MainWindow::registerPlugin(QObject *plugin, const QString &fileName)
QObject *proxiedPlugin = proxy->instantiate(pluginName);
if (proxiedPlugin != NULL) {
if (registerPlugin(proxiedPlugin, pluginName)) {
- qDebug("loaded plugin \"%s\"", QDir::toNativeSeparators(pluginName).toUtf8().constData());
+ qDebug("loaded plugin \"%s\"", qPrintable(pluginName));
} else {
- qWarning("plugin \"%s\" failed to load", pluginName.toUtf8().constData());
+ qWarning("plugin \"%s\" failed to load", qPrintable(pluginName));
}
}
} catch (const std::exception &e) {
@@ -1121,13 +1121,13 @@ void MainWindow::loadPlugins()
if (pluginLoader.instance() == NULL) {
m_UnloadedPlugins.push_back(pluginName);
qCritical("failed to load plugin %s: %s",
- pluginName.toUtf8().constData(), pluginLoader.errorString().toUtf8().constData());
+ qPrintable(pluginName), qPrintable(pluginLoader.errorString()));
} else {
if (registerPlugin(pluginLoader.instance(), pluginName)) {
- qDebug("loaded plugin \"%s\"", QDir::toNativeSeparators(pluginName).toUtf8().constData());
+ qDebug("loaded plugin \"%s\"", qPrintable(pluginName));
} else {
m_UnloadedPlugins.push_back(pluginName);
- qWarning("plugin \"%s\" failed to load", pluginName.toUtf8().constData());
+ qWarning("plugin \"%s\" failed to load", qPrintable(pluginName));
}
}
}
@@ -1289,7 +1289,7 @@ HANDLE MainWindow::spawnBinaryDirect(const QFileInfo &binary, const QString &arg
storeSettings();
if (!binary.exists()) {
- reportError(tr("\"%1\" not found").arg(binary.fileName()));
+ reportError(tr("Executable \"%1\" not found").arg(binary.fileName()));
return INVALID_HANDLE_VALUE;
}
diff --git a/src/spawn.cpp b/src/spawn.cpp
index 5639a78c..b1c5e963 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -117,9 +117,10 @@ HANDLE startBinary(const QFileInfo &binary, const QString &arguments, const QStr
"can be installed to work without elevation.\n\n"
"Start elevated anyway? "
"(you will be asked if you want to allow ModOrganizer.exe to make changes to the system)").arg(
- QDir::toNativeSeparators(binary.absoluteFilePath()))) == QMessageBox::Yes) {
+ QDir::toNativeSeparators(binary.absoluteFilePath())),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
::ShellExecuteW(NULL, L"runas", ToWString(QCoreApplication::applicationFilePath()).c_str(),
- (binaryName + L" " + ToWString(arguments)).c_str(), currentDirectoryName.c_str(), SW_SHOWNORMAL);
+ (std::wstring(L"\"") + binaryName + L"\" " + ToWString(arguments)).c_str(), currentDirectoryName.c_str(), SW_SHOWNORMAL);
return INVALID_HANDLE_VALUE;
} else {
return INVALID_HANDLE_VALUE;