void MainWindow::reloadSettings()
{
- QSettings settings;
#ifdef Q_WS_MAEMO_5
+ QSettings settings;
int rotation = settings.value("screen_rotation", 0).toInt();
setAttribute(Qt::WA_Maemo5AutoOrientation, rotation == 0);
setAttribute(Qt::WA_Maemo5LandscapeOrientation, rotation == 1);
: QThread(parent)
, frameBuffer(0)
{
- outputErrorMessageString.clear(); //don't deliver error messages of old instances...
QMutexLocker locker(&mutex);
m_stopped = false;
int passwd_failures = 0;
while (!m_stopped) { // try to connect as long as the server allows
m_passwordError = false;
+ outputErrorMessageString.clear(); //don't deliver error messages of old instances...
rfbClientLog = outputHandler;
rfbClientErr = outputHandler;
connect(&vncThread, SIGNAL(passwordRequest()), this, SLOT(requestPassword()), Qt::BlockingQueuedConnection);
connect(&vncThread, SIGNAL(outputErrorMessage(QString)), this, SLOT(outputErrorMessage(QString)));
+ //don't miss early connection failures
+ connect(&vncThread, SIGNAL(finished()), this, SLOT(startQuitting()));
+
m_clipboard = QApplication::clipboard();
connect(m_clipboard, SIGNAL(selectionChanged()), this, SLOT(clipboardSelectionChanged()));
connect(m_clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
void VncView::startQuitting()
{
+ if(isQuitting())
+ return;
+
kDebug(5011) << "about to quit";
//const bool connected = status() == RemoteView::Connected;
QSize framebufferSize();
QSize sizeHint() const;
QSize minimumSizeHint() const;
- void startQuitting();
bool isQuitting();
void reloadSettings();
bool start();
void setZoomLevel(int level = -1); //'level' doesn't correspond to actual magnification, though mapping is done here
void sendKey(Qt::Key key);
void sendKeySequence(QKeySequence keys);
+ void startQuitting();
void forceFullRepaint();
protected: