From: christian Date: Thu, 26 Aug 2010 12:57:17 +0000 (+0200) Subject: cleanup X-Git-Tag: 0.6~60 X-Git-Url: http://git.maemo.org/git/?p=presencevnc;a=commitdiff_plain;h=099efa34e489736fd2b46e62d4bb2b58119c16aa cleanup --- diff --git a/src/main.cpp b/src/main.cpp index ccb7dc2..f26d239 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,6 @@ int main(int argc, char *argv[]) QCoreApplication::setApplicationName("Presence VNC"); QApplication app(argc, argv); - //app.setAutoSipEnabled(true); QString url; int quality = 2; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 272101e..89e087c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -28,7 +28,6 @@ #include #include -#include MainWindow::MainWindow(QString url, int quality): QMainWindow(0), @@ -44,11 +43,11 @@ MainWindow::MainWindow(QString url, int quality): //set up toolbar toolbar = new QToolBar(0); - toolbar->addAction("Mod", this, SLOT(showModifierMenu())); - toolbar->addAction("Tab", this, SLOT(sendTab())); - toolbar->addAction("Esc", this, SLOT(sendEsc())); - toolbar->addAction("PgUp", this, SLOT(sendPgUp())); - toolbar->addAction("PgDn", this, SLOT(sendPgDn())); + toolbar->addAction(tr("Mod"), this, SLOT(showModifierMenu())); + toolbar->addAction(tr("Tab"), this, SLOT(sendTab())); + toolbar->addAction(tr("Esc"), this, SLOT(sendEsc())); + toolbar->addAction(tr("PgUp"), this, SLOT(sendPgUp())); + toolbar->addAction(tr("PgDn"), this, SLOT(sendPgDn())); toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/chat_enter.png"), "", this, SLOT(sendReturn())); toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/control_keyboard.png"), "", this, SLOT(showInputPanel())); @@ -166,7 +165,7 @@ void MainWindow::connectToHost(QString url) { disconnectFromHost(); - vnc_view = new VncView(this, url, RemoteView::Quality(2)); //TODO: get quality in dialog + vnc_view = new VncView(this, url, RemoteView::Quality(2)); connect(scaling, SIGNAL(toggled(bool)), vnc_view, SLOT(enableScaling(bool))); @@ -204,7 +203,6 @@ void MainWindow::statusChanged(RemoteView::RemoteStatus status) case RemoteView::Connected: setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false); if(!scaling->isChecked()) { - //if remote desktop is shown in full size, 2nd connection will have black screen //ugly hack to force a refresh (forceFullRepaint() doesn't repaint?? -> vnc_view hidden???) vnc_view->resize(scroll_area->size()); vnc_view->enableScaling(false); @@ -273,8 +271,6 @@ void MainWindow::showModifierMenu() vnc_view->sendKey(Qt::Key_Alt); } else if(chosen == win) { vnc_view->sendKey(Qt::Key_Meta); - } else { - std::cout << "unhandled action?\n"; } } diff --git a/src/mainwindow.h b/src/mainwindow.h index 52656e8..abdd66e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -37,6 +37,7 @@ protected: } }; + class MainWindow : public QMainWindow { Q_OBJECT public: diff --git a/src/preferences.cpp b/src/preferences.cpp index a1e66e3..ea0874b 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -123,8 +123,6 @@ Preferences::Preferences(QWidget *parent): this, SLOT(save())); } -Preferences::~Preferences() { } - void Preferences::save() { settings.setValue("screen_rotation", rotation_selector->currentIndex()); diff --git a/src/preferences.h b/src/preferences.h index b7483f7..4891b32 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -30,7 +30,6 @@ class Preferences : public QDialog { Q_OBJECT public: Preferences(QWidget *parent); - ~Preferences(); private slots: void save(); private: