All pastes #342876 Raw Edit

unbreak login

public text v1 · immutable
·published 2007-02-06 16:36 UTC
rendered paste body
Index: QtLogAccount.cpp
===================================================================
--- QtLogAccount.cpp	(rvision 9653)
+++ QtLogAccount.cpp	(copie de travail)
@@ -40,10 +40,10 @@
 
 #include <QtGui/QtGui>
 
-QtLogAccount::QtLogAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler)
+QtLogAccount::QtLogAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
 	:ILogin(qtLoginDialog, cUserProfileHandler){
 
-	_widget = new QWidget(qtLoginDialog);
+	_widget = new QWidget(parent);
 	_ui = new Ui::LogAccount();
 	_ui->setupUi(_widget);
 
@@ -264,4 +264,4 @@
      if (event->key()==Qt::Key_Return) {
 		loginClicked();
      }
- }
\ Pas de fin de ligne  la fin du fichier
+ }
Index: QtLogAccount.h
===================================================================
--- QtLogAccount.h	(rvision 9653)
+++ QtLogAccount.h	(copie de travail)
@@ -41,7 +41,7 @@
 	Q_OBJECT
 public:
 
-	QtLogAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler);
+	QtLogAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler);
 
 	~QtLogAccount();
 
Index: QtAddAccount.cpp
===================================================================
--- QtAddAccount.cpp	(rvision 9653)
+++ QtAddAccount.cpp	(copie de travail)
@@ -38,10 +38,10 @@
 
 #include <QtGui/QtGui>
 
-QtAddAccount::QtAddAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler)
+QtAddAccount::QtAddAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
 	:ILogin(qtLoginDialog, cUserProfileHandler){
 
-	_widget = new QWidget(qtLoginDialog);
+	_widget = new QWidget(parent);
 	_ui = new Ui::AddAccount();
 	_ui->setupUi(_widget);
 
@@ -110,4 +110,4 @@
      if (event->key()==Qt::Key_Return) {
 		nextClicked();
      }
- }
\ Pas de fin de ligne  la fin du fichier
+ }
Index: QtAddWengoAccount.cpp
===================================================================
--- QtAddWengoAccount.cpp	(rvision 9653)
+++ QtAddWengoAccount.cpp	(copie de travail)
@@ -40,10 +40,10 @@
 
 #include <QtGui/QtGui>
 
-QtAddWengoAccount::QtAddWengoAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler)
+QtAddWengoAccount::QtAddWengoAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
 	:ILogin(qtLoginDialog, cUserProfileHandler){
 
-	_widget = new QWidget(qtLoginDialog);
+	_widget = new QWidget(parent);
 	_ui = new Ui::AddWengoAccount();
 	_ui->setupUi(_widget);
 
Index: QtAddAccount.h
===================================================================
--- QtAddAccount.h	(rvision 9653)
+++ QtAddAccount.h	(copie de travail)
@@ -39,7 +39,7 @@
 	Q_OBJECT
 public:
 
-	QtAddAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler);
+	QtAddAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler);
 
 	~QtAddAccount();
 
Index: QtAddWengoAccount.h
===================================================================
--- QtAddWengoAccount.h	(rvision 9653)
+++ QtAddWengoAccount.h	(copie de travail)
@@ -39,7 +39,7 @@
 	Q_OBJECT
 public:
 
-	QtAddWengoAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler);
+	QtAddWengoAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler);
 
 	~QtAddWengoAccount();
 
Index: ILogin.h
===================================================================
--- ILogin.h	(rvision 9653)
+++ ILogin.h	(copie de travail)
@@ -26,7 +26,7 @@
 
 #include <control/profile/CUserProfileHandler.h>
 
-#include <QtGui/QWidget>
+#include <QtCore/QObject>
 #include <QtCore/QString>
 
 #include <string>
@@ -37,7 +37,7 @@
  *
  * @author Xavier Desjardins
  */
-class ILogin : public QWidget {
+class ILogin : public QObject {
 	Q_OBJECT
 public:
 
Index: QtAddSIPAccount.cpp
===================================================================
--- QtAddSIPAccount.cpp	(rvision 9653)
+++ QtAddSIPAccount.cpp	(copie de travail)
@@ -40,10 +40,10 @@
 
 #include <QtGui/QtGui>
 
-QtAddSIPAccount::QtAddSIPAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler)
+QtAddSIPAccount::QtAddSIPAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
 	:ILogin(qtLoginDialog, cUserProfileHandler){
 
-	_widget = new QWidget(qtLoginDialog);
+	_widget = new QWidget(parent);
 	_ui = new Ui::AddSIPAccount();
 	_ui->setupUi(_widget);
 
Index: QtAddSIPAccount.h
===================================================================
--- QtAddSIPAccount.h	(rvision 9653)
+++ QtAddSIPAccount.h	(copie de travail)
@@ -39,7 +39,7 @@
 	Q_OBJECT
 public:
 
-	QtAddSIPAccount(QtLoginDialog * qtLoginDialog, CUserProfileHandler & cUserProfileHandler);
+	QtAddSIPAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler);
 
 	~QtAddSIPAccount();
 
Index: QtLoginDialog.cpp
===================================================================
--- QtLoginDialog.cpp	(rvision 9653)
+++ QtLoginDialog.cpp	(copie de travail)
@@ -43,10 +43,10 @@
 	resize(1,1);
 
 	_centralWidget = new QStackedWidget(this);
-	_loginPage.push_back(new QtAddAccount(0, cUserProfileHandler));
-	_loginPage.push_back(new QtAddWengoAccount(0, cUserProfileHandler));
-	_loginPage.push_back(new QtAddSIPAccount(0, cUserProfileHandler));
-	_loginPage.push_back(new QtLogAccount(0, cUserProfileHandler));
+	_loginPage.push_back(new QtAddAccount(this, _centralWidget, cUserProfileHandler));
+	_loginPage.push_back(new QtAddWengoAccount(this, _centralWidget, cUserProfileHandler));
+	_loginPage.push_back(new QtAddSIPAccount(this, _centralWidget, cUserProfileHandler));
+	_loginPage.push_back(new QtLogAccount(this, _centralWidget, cUserProfileHandler));
 
     _centralWidget->addWidget(_loginPage[AddAccount]->getWidget());
     _centralWidget->addWidget(_loginPage[AddWengoAccount]->getWidget());
@@ -55,9 +55,8 @@
 	
 	setWindowTitle(tr("WengoPhone - Connexion"));
 
-    QVBoxLayout * layout = new QVBoxLayout;
+    QVBoxLayout * layout = new QVBoxLayout(this);
     layout->addWidget(_centralWidget);
-    setLayout(layout);
 	
 	changePage(LogAccount);
 }