projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f4ae000
)
fixing dependencies to core. MonolithicApplication is now a proper QObject
author
Marcus Eggenberger
<egs@quassel-irc.org>
Tue, 21 Oct 2008 12:45:48 +0000
(14:45 +0200)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Tue, 21 Oct 2008 16:52:52 +0000
(18:52 +0200)
src/CMakeLists.txt
patch
|
blob
|
history
src/client/client.h
patch
|
blob
|
history
src/client/clientsyncer.cpp
patch
|
blob
|
history
src/client/clientsyncer.h
patch
|
blob
|
history
src/qtui/coreconnectdlg.cpp
patch
|
blob
|
history
src/qtui/coreconnectdlg.h
patch
|
blob
|
history
src/qtui/monoapplication.cpp
patch
|
blob
|
history
src/qtui/monoapplication.h
patch
|
blob
|
history
src/qtui/qtuiapplication.cpp
patch
|
blob
|
history
diff --git
a/src/CMakeLists.txt
b/src/CMakeLists.txt
index
33374db
..
da979d5
100644
(file)
--- a/
src/CMakeLists.txt
+++ b/
src/CMakeLists.txt
@@
-56,7
+56,8
@@
endif(WANT_QTCLIENT)
if(WANT_MONO)
setup_qt4_variables(${LINK_DBUS} GUI NETWORK SCRIPT SQL ${LINK_WEBKIT})
if(WANT_MONO)
setup_qt4_variables(${LINK_DBUS} GUI NETWORK SCRIPT SQL ${LINK_WEBKIT})
- add_executable(quassel WIN32 common/main.cpp qtui/monoapplication.cpp ${COMMON_DEPS} ${CLIENT_DEPS} ${CORE_DEPS})
+ qt4_wrap_cpp(MOC qtui/monoapplication.h)
+ add_executable(quassel WIN32 common/main.cpp qtui/monoapplication.cpp ${MOC} ${COMMON_DEPS} ${CLIENT_DEPS} ${CORE_DEPS})
add_dependencies(quassel icons genversion_run)
set_target_properties(quassel PROPERTIES
COMPILE_FLAGS "-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_SQL_LIB -DBUILD_MONO"
add_dependencies(quassel icons genversion_run)
set_target_properties(quassel PROPERTIES
COMPILE_FLAGS "-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_SQL_LIB -DBUILD_MONO"
diff --git
a/src/client/client.h
b/src/client/client.h
index
62ad9b0
..
2d073c5
100644
(file)
--- a/
src/client/client.h
+++ b/
src/client/client.h
@@
-43,6
+43,7
@@
class BufferModel;
class BufferSyncer;
class ClientBacklogManager;
class ClientIrcListHelper;
class BufferSyncer;
class ClientBacklogManager;
class ClientIrcListHelper;
+class ClientSyncer;
class BufferViewManager;
class IrcUser;
class IrcChannel;
class BufferViewManager;
class IrcUser;
class IrcChannel;
@@
-146,6
+147,8
@@
signals:
void requestCreateNetwork(const NetworkInfo &info);
void requestRemoveNetwork(NetworkId);
void requestCreateNetwork(const NetworkInfo &info);
void requestRemoveNetwork(NetworkId);
+ void newClientSyncer(ClientSyncer *);
+
public slots:
//void selectBuffer(Buffer *);
public slots:
//void selectBuffer(Buffer *);
diff --git
a/src/client/clientsyncer.cpp
b/src/client/clientsyncer.cpp
index
655875f
..
a9d5972
100644
(file)
--- a/
src/client/clientsyncer.cpp
+++ b/
src/client/clientsyncer.cpp
@@
-170,6
+170,7
@@
void ClientSyncer::coreSocketConnected() {
}
void ClientSyncer::useInternalCore() {
}
void ClientSyncer::useInternalCore() {
+ emit startInternalCore();
emit connectToInternalCore(Client::instance()->signalProxy());
}
emit connectToInternalCore(Client::instance()->signalProxy());
}
diff --git
a/src/client/clientsyncer.h
b/src/client/clientsyncer.h
index
16c516d
..
d321451
100644
(file)
--- a/
src/client/clientsyncer.h
+++ b/
src/client/clientsyncer.h
@@
-61,6
+61,7
@@
signals:
void encrypted(bool);
void encrypted(bool);
+ void startInternalCore();
void connectToInternalCore(SignalProxy *proxy);
public slots:
void connectToInternalCore(SignalProxy *proxy);
public slots:
diff --git
a/src/qtui/coreconnectdlg.cpp
b/src/qtui/coreconnectdlg.cpp
index
6903d93
..
d61a021
100644
(file)
--- a/
src/qtui/coreconnectdlg.cpp
+++ b/
src/qtui/coreconnectdlg.cpp
@@
-24,11
+24,11
@@
#include "coreconnectdlg.h"
#include "coreconnectdlg.h"
+#include "client.h"
#include "clientsettings.h"
#include "clientsyncer.h"
#include "coreconfigwizard.h"
#include "iconloader.h"
#include "clientsettings.h"
#include "clientsyncer.h"
#include "coreconfigwizard.h"
#include "iconloader.h"
-#include "monoapplication.h"
CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent)
: QDialog(parent)
CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent)
: QDialog(parent)
@@
-44,6
+44,8
@@
CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent)
setWindowFlags(Qt::Sheet);
clientSyncer = new ClientSyncer(this);
setWindowFlags(Qt::Sheet);
clientSyncer = new ClientSyncer(this);
+ connect(this, SIGNAL(newClientSyncer(ClientSyncer *)), Client::instance(), SIGNAL(newClientSyncer(ClientSyncer *)));
+ emit newClientSyncer(clientSyncer); // announce the new client syncer via the client.
wizard = 0;
wizard = 0;
@@
-214,13
+216,13
@@
void CoreConnectDlg::on_accountButtonBox_accepted() {
}
void CoreConnectDlg::on_useInternalCore_clicked() {
}
void CoreConnectDlg::on_useInternalCore_clicked() {
- // FIXME: this needs to be a qobject_cast - therefore MonolithicApplication needs to be a proper QObject... :/
-
MonolithicApplication *monoApp = static
_cast<MonolithicApplication *>(QApplication::instance());
- if(monoApp) {
- qDebug() << "starting core...";
- monoApp->startInternalCore();
- monoApp->connectClientSyncer(clientSyncer);
- }
+
//
// FIXME: this needs to be a qobject_cast - therefore MonolithicApplication needs to be a proper QObject... :/
+
// MonolithicApplication *monoApp = qobject
_cast<MonolithicApplication *>(QApplication::instance());
+
//
if(monoApp) {
+
//
qDebug() << "starting core...";
+
//
monoApp->startInternalCore();
+
//
monoApp->connectClientSyncer(clientSyncer);
+
//
}
clientSyncer->useInternalCore();
startSync();
}
clientSyncer->useInternalCore();
startSync();
}
diff --git
a/src/qtui/coreconnectdlg.h
b/src/qtui/coreconnectdlg.h
index
ff980d3
..
ae3d5b7
100644
(file)
--- a/
src/qtui/coreconnectdlg.h
+++ b/
src/qtui/coreconnectdlg.h
@@
-18,8
+18,8
@@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef
_CORECONNECTDLG_H_
-#define
_CORECONNECTDLG_H_
+#ifndef
CORECONNECTDLG_H
+#define
CORECONNECTDLG_H
#include <QAbstractSocket>
#include <QAbstractSocket>
@@
-38,8
+38,10
@@
public:
CoreConnectDlg(bool = false, QWidget *parent = 0);
~CoreConnectDlg();
CoreConnectDlg(bool = false, QWidget *parent = 0);
~CoreConnectDlg();
-private slots:
+signals:
+ void newClientSyncer(ClientSyncer *);
+private slots:
/*** Phase Null: Accounts ***/
void restartPhaseNull();
/*** Phase Null: Accounts ***/
void restartPhaseNull();
diff --git
a/src/qtui/monoapplication.cpp
b/src/qtui/monoapplication.cpp
index
97688f2
..
7b05c73
100644
(file)
--- a/
src/qtui/monoapplication.cpp
+++ b/
src/qtui/monoapplication.cpp
@@
-33,8
+33,9
@@
MonolithicApplication::MonolithicApplication(int &argc, char **argv)
}
bool MonolithicApplication::init() {
}
bool MonolithicApplication::init() {
- if(Quassel::init()) {
- return QtUiApplication::init();
+ connect(Client::instance(), SIGNAL(newClientSyncer(ClientSyncer *)), this, SLOT(newClientSyncer(ClientSyncer *)));
+ if(QtUiApplication::init()) {
+ return true;
}
return false;
}
}
return false;
}
@@
-45,12
+46,14
@@
MonolithicApplication::~MonolithicApplication() {
delete _internal;
}
delete _internal;
}
-
bool MonolithicApplication::startInternalCore(
) {
-
return _internal->init(
);
+
void MonolithicApplication::newClientSyncer(ClientSyncer *syncer
) {
+
connect(syncer, SIGNAL(startInternalCore()), this, SLOT(startInternalCore())
);
}
}
-void MonolithicApplication::connectClientSyncer(ClientSyncer *syncer) {
+void MonolithicApplication::startInternalCore() {
+ _internal->init();
Core *core = Core::instance();
Core *core = Core::instance();
+ ClientSyncer *syncer = static_cast<ClientSyncer *>(sender());
connect(syncer, SIGNAL(connectToInternalCore(SignalProxy *)), core, SLOT(setupInternalClientSession(SignalProxy *)));
connect(core, SIGNAL(sessionState(const QVariant &)), syncer, SLOT(internalSessionStateReceived(const QVariant &)));
}
connect(syncer, SIGNAL(connectToInternalCore(SignalProxy *)), core, SLOT(setupInternalClientSession(SignalProxy *)));
connect(core, SIGNAL(sessionState(const QVariant &)), syncer, SLOT(internalSessionStateReceived(const QVariant &)));
}
diff --git
a/src/qtui/monoapplication.h
b/src/qtui/monoapplication.h
index
4050342
..
ff35ddd
100644
(file)
--- a/
src/qtui/monoapplication.h
+++ b/
src/qtui/monoapplication.h
@@
-27,13
+27,16
@@
class ClientSyncer;
class CoreApplicationInternal;
class MonolithicApplication : public QtUiApplication {
class CoreApplicationInternal;
class MonolithicApplication : public QtUiApplication {
+ Q_OBJECT
public:
MonolithicApplication(int &, char **);
~MonolithicApplication();
bool init();
public:
MonolithicApplication(int &, char **);
~MonolithicApplication();
bool init();
- bool startInternalCore();
- void connectClientSyncer(ClientSyncer *syncer);
+
+private slots:
+ void newClientSyncer(ClientSyncer *syncer);
+ void startInternalCore();
private:
CoreApplicationInternal *_internal;
private:
CoreApplicationInternal *_internal;
diff --git
a/src/qtui/qtuiapplication.cpp
b/src/qtui/qtuiapplication.cpp
index
6ae09c9
..
7a6f097
100644
(file)
--- a/
src/qtui/qtuiapplication.cpp
+++ b/
src/qtui/qtuiapplication.cpp
@@
-45,7
+45,6
@@
bool QtUiApplication::init() {
// QTimer::singleShot(0, gui, SLOT(init()));
gui->init();
resumeSessionIfPossible();
// QTimer::singleShot(0, gui, SLOT(init()));
gui->init();
resumeSessionIfPossible();
-
return true;
}
return false;
return true;
}
return false;