diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 6376e86..7fc777d 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -179,7 +179,7 @@ void MainWindow::on_attachButton_clicked() QStringList processList(allProcesses.uniqueKeys()); processList.sort(Qt::CaseInsensitive); bool ok; - QString process = QInputDialog::getItem(this, SELECT_PROCESS, INJECT_INFO, processList, 0, true, &ok); + QString process = QInputDialog::getItem(this, SELECT_PROCESS, INJECT_INFO, processList, 0, true, &ok, Qt::WindowCloseButtonHint); if (!ok) return; if (process.toInt(nullptr, 0)) Host::InjectProcess(process.toInt(nullptr, 0)); else for (auto processId : allProcesses.values(process)) Host::InjectProcess(processId); @@ -193,7 +193,7 @@ void MainWindow::on_detachButton_clicked() void MainWindow::on_hookButton_clicked() { bool ok; - QString hookCode = QInputDialog::getText(this, ADD_HOOK, CODE_INFODUMP, QLineEdit::Normal, "", &ok); + QString hookCode = QInputDialog::getText(this, ADD_HOOK, CODE_INFODUMP, QLineEdit::Normal, "", &ok, Qt::WindowCloseButtonHint); if (!ok) return; if (auto hp = ParseCode(hookCode)) Host::InsertHook(GetSelectedProcessId(), hp.value()); else Host::AddConsoleOutput(INVALID_CODE); @@ -211,7 +211,7 @@ void MainWindow::on_unhookButton_clicked() GenerateCode(hook, GetSelectedProcessId()) ); bool ok; - QString hook = QInputDialog::getItem(this, UNHOOK, REMOVE_HOOK, hookList, 0, false, &ok); + QString hook = QInputDialog::getItem(this, UNHOOK, REMOVE_HOOK, hookList, 0, false, &ok, Qt::WindowCloseButtonHint); if (ok) Host::RemoveHook(GetSelectedProcessId(), hooks.at(hookList.indexOf(hook)).insertion_address); } diff --git a/extensions/bingtranslate/bingtranslate.cpp b/extensions/bingtranslate/bingtranslate.cpp index 6135444..fd7d5c7 100644 --- a/extensions/bingtranslate/bingtranslate.cpp +++ b/extensions/bingtranslate/bingtranslate.cpp @@ -66,7 +66,14 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved { QTimer::singleShot(0, [] { - translateTo = QInputDialog::getItem(nullptr, "Select Language", "What language should Bing translate to?", languages, 0, false).split(" ")[1].toStdWString(); + translateTo = QInputDialog::getItem( + nullptr, + "Select Language", + "What language should Bing translate to?", + languages, + 0, false, nullptr, + Qt::WindowCloseButtonHint + ).split(" ")[1].toStdWString(); }); } break; diff --git a/extensions/googletranslate/googletranslate.cpp b/extensions/googletranslate/googletranslate.cpp index 4ac05e5..563d8c5 100644 --- a/extensions/googletranslate/googletranslate.cpp +++ b/extensions/googletranslate/googletranslate.cpp @@ -82,7 +82,14 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved { QTimer::singleShot(0, [] { - translateTo = QInputDialog::getItem(nullptr, "Select Language", "What language should Google translate to?", languages, 0, false).split(" ")[1].toStdWString(); + translateTo = QInputDialog::getItem( + nullptr, + "Select Language", + "What language should Google translate to?", + languages, + 0, false, nullptr, + Qt::WindowCloseButtonHint + ).split(" ")[1].toStdWString(); }); } break;