The branch, master has been updated via af679ed1fd34a7a062902d8b3960efe0dcfd62f8 (commit) from eafb95dd5e274e0d74c2c2a47126cdd7c300b2ae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit af679ed1fd34a7a062902d8b3960efe0dcfd62f8 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Fri Nov 2 12:32:27 2012 +0100 remove some memory leaks ----------------------------------------------------------------------- Summary of changes: main.cpp | 2 +- mainwindow.cpp | 2 +- profiledetailconfiguratorform.cpp | 2 +- svgframe.cpp | 2 +- x2goapplication.cpp | 3 ++- x2gobroker.cpp | 12 ++++++++++++ x2gobroker.h | 1 + 7 files changed, 19 insertions(+), 5 deletions(-) The diff of changes is: diff --git a/main.cpp b/main.cpp index c4184cc..c3d7dae 100644 --- a/main.cpp +++ b/main.cpp @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) } else { - new MainWindow; + MainWindow m; return app.exec(); } return 0; diff --git a/mainwindow.cpp b/mainwindow.cpp index b961fb4..1590319 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -26,6 +26,7 @@ #include <QFrame> #include <QVBoxLayout> #include <QResizeEvent> +#include <QDebug> #include "workarea.h" #include "svgframe.h" #include "x2goapplication.h" @@ -43,7 +44,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags): QMainWindow(pare MainWindow::~MainWindow() { - } void MainWindow::resizeEvent(QResizeEvent* event) diff --git a/profiledetailconfiguratorform.cpp b/profiledetailconfiguratorform.cpp index 3adc4a9..1ce8e09 100644 --- a/profiledetailconfiguratorform.cpp +++ b/profiledetailconfiguratorform.cpp @@ -51,7 +51,7 @@ ProfileDetailConfiguratorForm::ProfileDetailConfiguratorForm(QWidget* parent, Qt pbApply->setIcon(QIcon(":/trolltech/styles/commonstyle/images/standardbutton-apply-16.png")); pbOk->setIcon(QIcon(":/trolltech/styles/commonstyle/images/standardbutton-ok-16.png")); pbReset->setIcon(QIcon(":/trolltech/styles/commonstyle/images/standardbutton-clear-16.png")); - scrollArea->takeWidget(); + delete scrollArea->takeWidget(); } ProfileDetailConfiguratorForm::~ProfileDetailConfiguratorForm() diff --git a/svgframe.cpp b/svgframe.cpp index 3fb82fb..71db116 100644 --- a/svgframe.cpp +++ b/svgframe.cpp @@ -51,7 +51,7 @@ void SVGFrame::renderBackground() QPainter p ( &img ); if ( p.isActive() ) renderer->render ( &p ); - pal.setBrush ( QPalette::Window,QBrush ( QPixmap::fromImage ( img ) ) ); + pal.setBrush ( QPalette::Window,QBrush ( img ) ); setPalette ( pal ); } diff --git a/x2goapplication.cpp b/x2goapplication.cpp index eaa249a..1fd8881 100644 --- a/x2goapplication.cpp +++ b/x2goapplication.cpp @@ -101,13 +101,14 @@ void X2GoApplication::slotInitApplication() mainWindow->show(); clientConfig->get_disallowSessionEdit().set_value((QVariant)true); broker=new X2GoBroker(); + if(broker->get_brokerAbort()) + return; connect(broker, SIGNAL(signalSessionsLoaded()), this, SLOT(slotBrokerSessionsConfig())); broker->getUserSessions(); } if(clientConfig->get_disallowSessionEdit().get_value().toBool()) { profileSettingsForm->hide(); - qDebug()<<"hide sttings"; } } diff --git a/x2gobroker.cpp b/x2gobroker.cpp index 714ce11..0cd2152 100644 --- a/x2gobroker.cpp +++ b/x2gobroker.cpp @@ -30,6 +30,9 @@ X2GoBroker::X2GoBroker(QObject* parent): QObject(parent) { http=0; + sessionsRequest=-1; + selSessRequest=-1; + brokerAbort=false; X2GoClientConfig* cfg=X2GoApplication::instance()->get_clientConfig(); QString urlString=cfg->get_brokerUrl().get_value().toString(); url = QUrl( urlString); @@ -60,6 +63,7 @@ X2GoBroker::X2GoBroker(QObject* parent): QObject(parent) if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { MessageBox::critical(tr("Can't open file")+" - "+cfg->get_authId().get_value().toString(), MessageBox::OK); + brokerAbort=true; X2GoApplication::exit(-1); } QTextStream in(&file); @@ -83,12 +87,18 @@ void X2GoBroker::getLoginData() { MessageBox::Buttons res=MessageBox::input(tr("Enter user name for authentication on broker"),tr("User:"),user); if(res!=MessageBox::OK) + { + brokerAbort=true; X2GoApplication::exit(-1); + } } pass=QString::null; MessageBox::Buttons res=MessageBox::input(tr("Enter password for authentication on broker"),tr("Password:"),pass, QLineEdit::Password); if(res!=MessageBox::OK) + { + brokerAbort=true; X2GoApplication::exit(-1); + } } @@ -294,3 +304,5 @@ QString X2GoBroker::getHexVal(const QByteArray& ba) return val.join ( ":" ); } + + diff --git a/x2gobroker.h b/x2gobroker.h index 68dee95..49e3248 100644 --- a/x2gobroker.h +++ b/x2gobroker.h @@ -33,6 +33,7 @@ class QHttp; class X2GoBroker : public QObject { X2GO_RO_PROPERTY(QString, sessionsConfig) + X2GO_RO_PROPERTY(bool, brokerAbort) Q_OBJECT public: explicit X2GoBroker(QObject* parent = 0); hooks/post-receive -- x2goclient2.git (X2Go Client 2 (rewrite of x2goclient.git)) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "x2goclient2.git" (X2Go Client 2 (rewrite of x2goclient.git)).