mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
Fixed dialog parents and Stopping server on delete
This commit is contained in:
@@ -116,6 +116,7 @@ InvitationsRfbServer::InvitationsRfbServer()
|
||||
|
||||
InvitationsRfbServer::~InvitationsRfbServer()
|
||||
{
|
||||
stop();
|
||||
KSharedConfigPtr config = KGlobal::config();
|
||||
KConfigGroup krfbConfig(config,"Security");
|
||||
krfbConfig.writeEntry("allowUnattendedAccess",m_allowUnattendedAccess);
|
||||
|
||||
@@ -183,14 +183,12 @@ void MainWindow::toggleDesktopSharing(bool enable)
|
||||
{
|
||||
if(enable) {
|
||||
if(!InvitationsRfbServer::instance->start()) {
|
||||
KMessageBox::error(0,
|
||||
KMessageBox::error(this,
|
||||
i18n("Failed to start the krfb server. Desktop sharing "
|
||||
"will not work. Try setting another port in the settings "
|
||||
"and restart krfb."));
|
||||
}
|
||||
connect(qApp, SIGNAL(aboutToQuit()), InvitationsRfbServer::instance, SLOT(stop()));
|
||||
} else {
|
||||
disconnect(qApp, SIGNAL(aboutToQuit()), InvitationsRfbServer::instance, SLOT(stop()));
|
||||
InvitationsRfbServer::instance->stop();
|
||||
if(m_passwordEditable) {
|
||||
m_passwordEditable = false;
|
||||
@@ -232,7 +230,7 @@ void MainWindow::onContactDoubleClicked(const Tp::AccountPtr &account, const KTp
|
||||
void MainWindow::pendingDesktopShareFinished(Tp::PendingOperation *operation)
|
||||
{
|
||||
if(operation->isError()) {
|
||||
KMessageBox::error(0,
|
||||
KMessageBox::error(this,
|
||||
operation->errorName() + ": " + operation->errorMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ RfbServer::RfbServer(QObject *parent)
|
||||
|
||||
RfbServer::~RfbServer()
|
||||
{
|
||||
stop();
|
||||
if (d->screen) {
|
||||
rfbScreenCleanup(d->screen);
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ TubesRfbServer::TubesRfbServer(QObject *parent)
|
||||
TubesRfbServer::~TubesRfbServer()
|
||||
{
|
||||
kDebug();
|
||||
stop();
|
||||
delete d;
|
||||
}
|
||||
|
||||
@@ -186,7 +187,6 @@ void TubesRfbServer::startAndCheck()
|
||||
//TODO listeningAddress() should be a QHostAddress
|
||||
d->stubeServer->exportTcpSocket(QHostAddress(QString::fromAscii(listeningAddress())),
|
||||
listeningPort());
|
||||
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(stop()));
|
||||
}
|
||||
|
||||
void TubesRfbServer::onTubeRequested()
|
||||
|
||||
Reference in New Issue
Block a user