Changeset View
Changeset View
Standalone View
Standalone View
vnc/vncview.cpp
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include "vncview.h" | 24 | #include "vncview.h" | ||
25 | #include "krdc_debug.h" | 25 | #include "krdc_debug.h" | ||
26 | 26 | | |||
27 | #include <QApplication> | 27 | #include <QApplication> | ||
28 | #include <QImage> | 28 | #include <QImage> | ||
29 | #include <QPainter> | 29 | #include <QPainter> | ||
30 | #include <QMouseEvent> | 30 | #include <QMouseEvent> | ||
31 | #include <QTimer> | ||||
31 | 32 | | |||
32 | #ifdef QTONLY | 33 | #ifdef QTONLY | ||
33 | #include <QMessageBox> | 34 | #include <QMessageBox> | ||
34 | #include <QInputDialog> | 35 | #include <QInputDialog> | ||
35 | #define KMessageBox QMessageBox | 36 | #define KMessageBox QMessageBox | ||
36 | #define error(parent, message, caption) \ | 37 | #define error(parent, message, caption) \ | ||
37 | critical(parent, caption, message) | 38 | critical(parent, caption, message) | ||
38 | #else | 39 | #else | ||
▲ Show 20 Lines • Show All 327 Lines • ▼ Show 20 Line(s) | 357 | { | |||
366 | } | 367 | } | ||
367 | 368 | | |||
368 | KPasswordDialog dialog(this); | 369 | KPasswordDialog dialog(this); | ||
369 | dialog.setPrompt(i18n("Please enter the SSH password.")); | 370 | dialog.setPrompt(i18n("Please enter the SSH password.")); | ||
370 | if (dialog.exec() == KPasswordDialog::Accepted) { | 371 | if (dialog.exec() == KPasswordDialog::Accepted) { | ||
371 | m_sshTunnelThread->setPassword(dialog.password(), VncSshTunnelThread::PasswordFromDialog); | 372 | m_sshTunnelThread->setPassword(dialog.password(), VncSshTunnelThread::PasswordFromDialog); | ||
372 | } else { | 373 | } else { | ||
373 | qCDebug(KRDC) << "ssh password dialog not accepted"; | 374 | qCDebug(KRDC) << "ssh password dialog not accepted"; | ||
374 | startQuitting(); | 375 | m_sshTunnelThread->userCanceledPasswordRequest(); | ||
376 | // We need to use a single shot because otherwise startQuitting deletes the thread | ||||
377 | // but we're here from a blocked queued connection and thus we deadlock | ||||
378 | QTimer::singleShot(0, this, &VncView::startQuitting); | ||||
375 | } | 379 | } | ||
376 | } | 380 | } | ||
377 | #endif | 381 | #endif | ||
378 | 382 | | |||
379 | void VncView::outputErrorMessage(const QString &message) | 383 | void VncView::outputErrorMessage(const QString &message) | ||
380 | { | 384 | { | ||
381 | qCritical(KRDC) << message; | 385 | qCritical(KRDC) << message; | ||
382 | 386 | | |||
▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines |