mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 08:15:37 +00:00
more c++ bug fixes
This commit is contained in:
parent
21e0066be0
commit
69e36050c8
@ -1,16 +1,20 @@
|
|||||||
#include "popupmanager.h"
|
#include "popupmanager.h"
|
||||||
|
|
||||||
|
QMessageBox *popupmanager::pinMsgBox = nullptr;
|
||||||
|
|
||||||
|
popupmanager::popupmanager(){}
|
||||||
|
|
||||||
// this opens a non-blocking informative message telling the user to enter the given pin
|
// this opens a non-blocking informative message telling the user to enter the given pin
|
||||||
// it is open-loop: if the user cancels, nothing happens
|
// it is open-loop: if the user cancels, nothing happens
|
||||||
// it is expected that upon pairing completion, the ::closePinDialog function will be called.
|
// it is expected that upon pairing completion, the ::closePinDialog function will be called.
|
||||||
void popupmanager::displayPinDialog(QString pin, QWidget* parent) {
|
void popupmanager::displayPinDialog(QString pin, QWidget* parent) {
|
||||||
|
|
||||||
pinMsgBox = new QMessageBox( parent );
|
popupmanager::pinMsgBox = new QMessageBox( parent );
|
||||||
pinMsgBox->setAttribute( Qt::WA_DeleteOnClose ); //makes sure the msgbox is deleted automatically when closed
|
popupmanager::pinMsgBox->setAttribute( Qt::WA_DeleteOnClose ); //makes sure the msgbox is deleted automatically when closed
|
||||||
pinMsgBox->setStandardButtons( QMessageBox::Ok );
|
popupmanager::pinMsgBox->setStandardButtons( QMessageBox::Ok );
|
||||||
pinMsgBox->setText("Please enter the number " + pin + " on the GFE dialog on the computer.");
|
popupmanager::pinMsgBox->setText("Please enter the number " + pin + " on the GFE dialog on the computer.");
|
||||||
pinMsgBox->setInformativeText("This dialog will be dismissed once complete.");
|
popupmanager::pinMsgBox->setInformativeText("This dialog will be dismissed once complete.");
|
||||||
pinMsgBox->open();
|
popupmanager::pinMsgBox->open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// to be called when the pairing is complete
|
// to be called when the pairing is complete
|
||||||
|
@ -6,11 +6,12 @@
|
|||||||
class popupmanager
|
class popupmanager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
popupmanager();
|
||||||
static void displayPinDialog(QString pin, QWidget* parent);
|
static void displayPinDialog(QString pin, QWidget* parent);
|
||||||
static void closePinDialog();
|
static void closePinDialog();
|
||||||
static QString getHostnameDialog(QWidget* parent);
|
static QString getHostnameDialog(QWidget* parent);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
static QMessageBox *pinMsgBox;
|
static QMessageBox *pinMsgBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user