Stability
Vadim Lebedev
vadim at mbdsys.com
Thu Aug 14 15:14:48 CEST 2008
Applied
Ralf Schlatterbeck wrote:
> On Fri, Aug 01, 2008 at 05:42:19PM +0200, Vadim Lebedev wrote:
>
>> Ralf Schlatterbeck wrote:
>>
>>> - Crash when clicking "Log on" when connect was recently pressed, this
>>> can be reproduced if you're fast enough while the client is still busy
>>> connecting:
>>> - go offline
>>> - in login dialog click "Connect"
>>> - in qutecom menu click "Log On" while the client is still connecting
>>> (you need to be quick before the connect finishes and the menu shows
>>> "Log Off")
>>> - crash
>>> -> Probably the menu should already display "Log Off" when the connect
>>> is in progress.
>>>
>>>
>>>
>> Yes, probably Connect button should generate a signal causing
>> "Log On" to be disabled
>>
>
> I've fixed this one:
>
> # HG changeset patch
> # User Ralf Schlatterbeck <rsc at runtux.com>
> # Date 1217922719 -7200
> # Node ID cfa80376cf7bf9f0f646ccdc663d330dffbefef7
> # Parent 4b7f91e915a741493622cf778f7fa8bf5728f64a
> Fix crash when clicking "Log on" when connect was recently pressed
> This fix disables the Toolbar "Log on" while the client is connecting.
> The client re-enables the menu automatically when connected or when a
> timeout is reached. I've added enabling the menu if the user presses
> "Cancel" in the login dialog. Fixes Kvats issue100.
>
> diff -r 4b7f91e915a7 -r cfa80376cf7b wengophone/src/presentation/qt/QtToolBar.cpp
> --- a/wengophone/src/presentation/qt/QtToolBar.cpp Thu Jul 31 22:50:21 2008 +0200
> +++ b/wengophone/src/presentation/qt/QtToolBar.cpp Tue Aug 05 09:51:59 2008 +0200
> @@ -636,6 +636,10 @@ void QtToolBar::userProfileIsInitialized
> updateActionsAccordingToUserStatus();
> }
>
> +void QtToolBar::enableMenuBar() {
> + _ui->menuBar->setEnabled(true);
> +}
> +
> void QtToolBar::updateActionsAccordingToUserStatus() {
> // We need to use a boolean to keep trace of the user status because when
> // userProfileDeleted is called, the user profile is still alive, even if
> @@ -645,7 +649,7 @@ void QtToolBar::updateActionsAccordingTo
> } else {
> _ui->actionLogOff->setText(tr("Log &On..."));
> }
> - _ui->menuBar->setEnabled(true);
> + _ui->menuBar->setEnabled(_userIsLogged);
> _ui->toolBar->setEnabled(_userIsLogged);
>
> // This list contains all actions which needs a logged user to work
> diff -r 4b7f91e915a7 -r cfa80376cf7b wengophone/src/presentation/qt/QtToolBar.h
> --- a/wengophone/src/presentation/qt/QtToolBar.h Thu Jul 31 22:50:21 2008 +0200
> +++ b/wengophone/src/presentation/qt/QtToolBar.h Tue Aug 05 09:51:59 2008 +0200
> @@ -124,7 +124,9 @@ public Q_SLOTS:
> void slotConfigChanged(QString key);
>
> void userProfileIsInitialized();
> -
> +
> + void enableMenuBar();
> +
> void updateMenuActions();
>
> private Q_SLOTS:
> diff -r 4b7f91e915a7 -r cfa80376cf7b wengophone/src/presentation/qt/login/QtLoginDialog.cpp
> --- a/wengophone/src/presentation/qt/login/QtLoginDialog.cpp Thu Jul 31 22:50:21 2008 +0200
> +++ b/wengophone/src/presentation/qt/login/QtLoginDialog.cpp Tue Aug 05 09:51:59 2008 +0200
> @@ -25,6 +25,7 @@
> #include "QtLogAccount.h"
>
> #include <presentation/qt/QtWengoPhone.h>
> +#include <presentation/qt/QtToolBar.h>
>
> #include <control/profile/CUserProfileHandler.h>
>
> @@ -50,6 +51,7 @@ QtLoginDialog::QtLoginDialog(QtWengoPhon
> _loginPage.push_back(new QtAddWengoAccount(this, _centralWidget, cUserProfileHandler));
> _loginPage.push_back(new QtAddSIPAccount(this, _centralWidget, cUserProfileHandler));
> _loginPage.push_back(new QtLogAccount(this, _centralWidget, cUserProfileHandler));
> + SAFE_CONNECT(this, SIGNAL(rejected()), SLOT(loginRejected()));
>
> _centralWidget->addWidget(_loginPage[AddAccount]);
> _centralWidget->addWidget(_loginPage[AddWengoAccount]);
> @@ -81,6 +83,10 @@ ILogin* QtLoginDialog::currentPage() con
> return _loginPage[_centralWidget->currentIndex()];
> }
>
> +void QtLoginDialog::loginRejected() {
> + _qtWengoPhone->getQtToolBar().enableMenuBar();
> +}
> +
> void QtLoginDialog::setInvalidAccount(const SipAccount & sipAccount) {
> if (sipAccount.getType() == SipAccount::SipAccountTypeWengo) {
> //wengo account
> diff -r 4b7f91e915a7 -r cfa80376cf7b wengophone/src/presentation/qt/login/QtLoginDialog.h
> --- a/wengophone/src/presentation/qt/login/QtLoginDialog.h Thu Jul 31 22:50:21 2008 +0200
> +++ b/wengophone/src/presentation/qt/login/QtLoginDialog.h Tue Aug 05 09:51:59 2008 +0200
> @@ -68,6 +68,11 @@ public:
>
> public Q_SLOTS:
> /**
> + * login cancelled -- enable toolbar menu.
> + */
> + void loginRejected();
> +
> + /**
> * Init login entry and display a message on the login to say that the
> * login/password is invalid.
> */
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qutecom.org/pipermail/qutecom-dev/attachments/20080814/3f35dc18/attachment.htm
More information about the QuteCom-dev
mailing list