From f0b77e01880830ac5d303d0d15ffdb34a37753a2 Mon Sep 17 00:00:00 2001 From: Mathieu Leduc-Hamel <mlhamel@arak4.(none)> Date: Fri, 29 Jan 2010 13:05:37 -0500 Subject: [PATCH] Fix kde project data loading in dev mode --- sflphone-client-kde/src/SFLPhone.cpp | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/sflphone-client-kde/src/SFLPhone.cpp b/sflphone-client-kde/src/SFLPhone.cpp index 95240a4921..e7e1c7453e 100644 --- a/sflphone-client-kde/src/SFLPhone.cpp +++ b/sflphone-client-kde/src/SFLPhone.cpp @@ -101,9 +101,9 @@ bool SFLPhone::initialize() void SFLPhone::setObjectNames() { - view->setObjectName("view"); - statusBar()->setObjectName("statusBar"); - trayIcon->setObjectName("trayIcon"); + view->setObjectName("view"); + statusBar()->setObjectName("statusBar"); + trayIcon->setObjectName("trayIcon"); } void SFLPhone::setupActions() @@ -176,13 +176,23 @@ void SFLPhone::setupActions() actionCollection()->addAction("action_accountCreationWizard", action_accountCreationWizard); QString rcFilePath = QString(DATA_INSTALL_DIR) + "/sflphone-client-kde/sflphone-client-kdeui.rc"; + if(! QFile::exists(rcFilePath)) { QDir dir; dir.cdUp(); - dir.cdUp(); dir.cd("data"); rcFilePath = dir.filePath("sflphone-client-kdeui.rc"); + qDebug() << "rcFilePath = " << rcFilePath ; + + if(! QFile::exists(rcFilePath)) + { + QDir dir; + dir.cdUp(); + dir.cdUp(); + dir.cd("data"); + rcFilePath = dir.filePath("sflphone-client-kdeui.rc"); + } } qDebug() << "rcFilePath = " << rcFilePath ; createGUI(rcFilePath); @@ -205,6 +215,7 @@ void SFLPhone::quitButton() { InstanceInterface & instance = InstanceInterfaceSingleton::getInstance(); qDebug() << "quitButton : " << view->listWidget_callList->count() << " calls open."; + if(view->listWidget_callList->count() > 0 && instance.getRegistrationCount() <= 1) { qDebug() << "Attempting to quit when still having some calls open."; @@ -232,10 +243,10 @@ void SFLPhone::sendNotif(QString caller) void SFLPhone::changeEvent(QEvent * event) { - if (event->type() == QEvent::ActivationChange && iconChanged && isActiveWindow()) - { - iconChanged = false; - } + if (event->type() == QEvent::ActivationChange && iconChanged && isActiveWindow()) + { + iconChanged = false; + } } void SFLPhone::on_view_statusMessageChangeAsked(const QString & message) -- GitLab