mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 05:39:11 -04:00
Fix NotifyQt::askForPassword QInputDialog is not created in GUI Thread.
This commit is contained in:
parent
bc76b10792
commit
e137c17039
4 changed files with 134 additions and 56 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <QColorDialog>
|
||||
#include <QDesktopServices>
|
||||
#include <QIcon>
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QPixmap>
|
||||
#include <QStatusBar>
|
||||
|
@ -1689,3 +1690,19 @@ void MainWindow::setCompactStatusMode(bool compact)
|
|||
ratesstatus->setCompactMode(compact);
|
||||
//opModeStatus: TODO Show only ???
|
||||
}
|
||||
|
||||
Gui_InputDialogReturn MainWindow::guiInputDialog(const QString& windowTitle, const QString& labelText, QLineEdit::EchoMode textEchoMode, bool modal)
|
||||
{
|
||||
|
||||
QInputDialog dialog(this);
|
||||
dialog.setWindowTitle(windowTitle);
|
||||
dialog.setLabelText(labelText);
|
||||
dialog.setTextEchoMode(textEchoMode);
|
||||
dialog.setModal(modal);
|
||||
|
||||
Gui_InputDialogReturn ret;
|
||||
ret.execReturn = dialog.exec();
|
||||
ret.textValue = dialog.textValue();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue