First check-in of the Qtopia build system. See qtopia-build/README.
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 31 Aug 2007 14:02:55 +0000 (14:02 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 31 Aug 2007 14:02:55 +0000 (14:02 +0000)
Yes, this compiles and links an example application (that includes all quassel parts
intended for Qtopia). Nope, it does not display more than a button, since the main() is
still the one from the Qtopia example app.
And yes, this has hardly been tested and will probably be redesigned at some point. But it's still
a proof of concept :)

17 files changed:
qtopia-build/README [new file with mode: 0644]
qtopia-build/qtopia.pro [new file with mode: 0644]
src/client/client.cpp
src/client/client.pro [new file with mode: 0644]
src/common/common.pro [new file with mode: 0644]
src/common/ircuser.cpp
src/common/message.h
src/contrib/qxt/qxt.pro [new file with mode: 0644]
src/contrib/qxt/qxtboundfunction.h
src/core/core.cpp
src/qtgui/mainwin.cpp
src/qtopia/example.cpp [new file with mode: 0644]
src/qtopia/example.desktop [new file with mode: 0644]
src/qtopia/example.h [new file with mode: 0644]
src/qtopia/examplebase.ui [new file with mode: 0644]
src/qtopia/main.cpp [new file with mode: 0644]
src/qtopia/qtopia.pro [new file with mode: 0644]

diff --git a/qtopia-build/README b/qtopia-build/README
new file mode 100644 (file)
index 0000000..5e8d23b
--- /dev/null
@@ -0,0 +1,14 @@
+# Configure for x86 (emulator) or greenphone:
+gph -C x86 OR gph -C greenphone
+
+# Create Makefiles:
+qtopiamake
+
+# Build:
+make
+
+# Create Packages:
+gph -p
+
+# Run:
+gph -r
diff --git a/qtopia-build/qtopia.pro b/qtopia-build/qtopia.pro
new file mode 100644 (file)
index 0000000..bb4a36f
--- /dev/null
@@ -0,0 +1,18 @@
+qtopia_project(qtopia app)
+
+TARGET=quasseltopia
+CONFIG+=qtopia_main no_quicklaunch
+
+# Find files
+INCLUDEPATH+=../src/qtopia ../src/client ../src/common ../src/contrib/qxt
+
+
+# Include .pro from src dirs
+include(../src/contrib/qxt/qxt.pro)
+include(../src/common/common.pro)
+include(../src/qtopia/qtopia.pro)
+include(../src/client/client.pro)
+
+# SXE permissions required
+pkg.domain=none
+
index 2b8e96e..f98fe72 100644 (file)
@@ -99,7 +99,6 @@ void Client::init() {
   layoutTimer->setInterval(0);
   layoutTimer->setSingleShot(false);
   connect(layoutTimer, SIGNAL(timeout()), this, SLOT(layoutMsg()));
-
 }
 
 Client::~Client() {
diff --git a/src/client/client.pro b/src/client/client.pro
new file mode 100644 (file)
index 0000000..5e67dfb
--- /dev/null
@@ -0,0 +1,2 @@
+SOURCES+=buffer.cpp buffertreemodel.cpp client.cpp clientsettings.cpp treemodel.cpp
+HEADERS+=buffer.h buffertreemodel.h client.h clientsettings.h treemodel.h
diff --git a/src/common/common.pro b/src/common/common.pro
new file mode 100644 (file)
index 0000000..0561e30
--- /dev/null
@@ -0,0 +1,2 @@
+SOURCES+=global.cpp ircuser.cpp logger.cpp message.cpp settings.cpp signalproxy.cpp util.cpp
+HEADERS+=global.h ircuser.h logger.h message.h quasselui.h settings.h signalproxy.h util.h
index dd60aa9..be5f49a 100644 (file)
@@ -76,7 +76,8 @@ void IrcUser::setChannelmode(const QString &channel, const QSet<QString> &channe
 
 QSet<QString> IrcUser::channelmode(const QString &channel) const {
   if(channelmodes_.contains(channel))
-    throw NoSuchChannelException();
+    //throw NoSuchChannelException();
+    Q_ASSERT(false); // FIXME: exception disabled for qtopia testing
   else
     return QSet<QString>();
 }
index 36950ec..65d2828 100644 (file)
@@ -34,15 +34,14 @@ struct Message {
 
   uint msgId;
   BufferId buffer;
-  QString target;
   QString text;
   QString sender;
   Type type;
   quint8 flags;
   QDateTime timeStamp;
 
-  Message(QString _target, Type _type = Plain, QString _text = "", QString _sender = "", quint8 _flags = None)
-  : target(_target), text(_text), sender(_sender), type(_type), flags(_flags) { timeStamp = QDateTime::currentDateTime().toUTC(); }
+  //Message(QString _target, Type _type = Plain, QString _text = "", QString _sender = "", quint8 _flags = None)
+  //: target(_target), text(_text), sender(_sender), type(_type), flags(_flags) { timeStamp = QDateTime::currentDateTime().toUTC(); }
 
   Message(BufferId _buffer = BufferId(), Type _type = Plain, QString _text = "", QString _sender = "", quint8 _flags = None)
   : buffer(_buffer), text(_text), sender(_sender), type(_type), flags(_flags) { timeStamp = QDateTime::currentDateTime().toUTC(); }
diff --git a/src/contrib/qxt/qxt.pro b/src/contrib/qxt/qxt.pro
new file mode 100644 (file)
index 0000000..5b2b89e
--- /dev/null
@@ -0,0 +1,2 @@
+SOURCES+=qxtmetaobject.cpp qxtnull.cpp qxtrpcpeer.cpp
+HEADERS+=qxtboundfunction.h qxtboundfunctionbase.h qxtglobal.h qxtmetaobject.h qxtnullable.h qxtnull.h qxtpimpl.h qxtrpcpeer.h
index 80d0294..2c0e644 100644 (file)
@@ -45,7 +45,7 @@ public:
         return invoke<T>(Qt::BlockingQueuedConnection, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
 #else
         qWarning() << "QxtBoundFunction::invoke: Cannot return a value using a queued connection";
-        return QxtNull;
+        return QxtNull();
 #endif
     }
 
index d633038..dc22a97 100644 (file)
@@ -94,6 +94,7 @@ void Core::stopListening() {
 
 void Core::incomingConnection() {
   // TODO implement SSL
+  // TODO While
   QTcpSocket *socket = server.nextPendingConnection();
   connect(socket, SIGNAL(disconnected()), this, SLOT(clientDisconnected()));
   connect(socket, SIGNAL(readyRead()), this, SLOT(clientHasData()));
index 61073a7..2bc5cf7 100644 (file)
 
 MainWin::MainWin(QtGui *_gui, QWidget *parent) : QMainWindow(parent), gui(_gui) {
   ui.setupUi(this);
-  //setWindowTitle("Quassel IRC");
-  setWindowTitle(QString::fromUtf8("Κυασελ Εγαρζη"));
+  setWindowTitle("Quassel IRC");
+  //setWindowTitle(QString::fromUtf8("Κυασελ Εγαρζη"));
   setWindowIcon(QIcon(":/qirc-icon.png"));
   setWindowIconText("Quassel IRC");
 
   statusBar()->showMessage(tr("Waiting for core..."));
-  
+
 }
 
 void MainWin::init() {
diff --git a/src/qtopia/example.cpp b/src/qtopia/example.cpp
new file mode 100644 (file)
index 0000000..b6756a3
--- /dev/null
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2000-$THISYEAR$ $TROLLTECH$. All rights reserved.
+**
+** This file is part of the $MODULE$ of the Qtopia Toolkit.
+**
+** $TROLLTECH_DUAL_LICENSE$
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#include "example.h"
+#include <qpushbutton.h>
+
+ExampleBase::ExampleBase( QWidget *parent, Qt::WFlags f )
+    : QWidget( parent, f )
+{
+    setupUi( this );
+}
+
+ExampleBase::~ExampleBase()
+{
+}
+
+/* 
+ *  Constructs a Example which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f' 
+ */
+Example::Example( QWidget *parent, Qt::WFlags f )
+    : ExampleBase( parent, f )
+{
+    connect(quit, SIGNAL(clicked()), this, SLOT(goodBye()));
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+Example::~Example()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  A simple slot... not very interesting.
+ */
+void Example::goodBye()
+{
+    close();
+}
+
diff --git a/src/qtopia/example.desktop b/src/qtopia/example.desktop
new file mode 100644 (file)
index 0000000..3a4067d
--- /dev/null
@@ -0,0 +1,10 @@
+[Translation]
+File=example-nct
+Context=Example
+
+[Desktop Entry]
+Comment[]=An Example Program
+Exec=quasseltest
+Icon=example/Example
+Type=Application
+Name[]=QuasselTest
diff --git a/src/qtopia/example.h b/src/qtopia/example.h
new file mode 100644 (file)
index 0000000..76d2bb0
--- /dev/null
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2000-$THISYEAR$ $TROLLTECH$. All rights reserved.
+**
+** This file is part of the $MODULE$ of the Qtopia Toolkit.
+**
+** $TROLLTECH_DUAL_LICENSE$
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#ifndef EXAMPLE_H
+#define EXAMPLE_H
+#include "ui_examplebase.h"
+
+class ExampleBase : public QWidget, public Ui_ExampleBase
+{
+public:
+    ExampleBase( QWidget *parent = 0, Qt::WFlags f = 0 );
+    virtual ~ExampleBase();
+};
+
+class Example : public ExampleBase
+{ 
+    Q_OBJECT
+public:
+    Example( QWidget *parent = 0, Qt::WFlags f = 0 );
+    virtual ~Example();
+
+private slots:
+    void goodBye();
+};
+
+#endif // EXAMPLE_H
diff --git a/src/qtopia/examplebase.ui b/src/qtopia/examplebase.ui
new file mode 100644 (file)
index 0000000..55a3187
--- /dev/null
@@ -0,0 +1,44 @@
+<ui version="4.0" stdsetdef="1" >
+  <author></author>
+  <comment></comment>
+  <exportmacro></exportmacro>
+  <class>ExampleBase</class>
+  <widget class="QWidget" name="ExampleBase" >
+    <property name="geometry" >
+      <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>196</width>
+        <height>245</height>
+      </rect>
+    </property>
+    <property name="windowTitle" >
+      <string>Example</string>
+    </property>
+    <layout class="QVBoxLayout" >
+      <property name="margin" >
+        <number>11</number>
+      </property>
+      <property name="spacing" >
+        <number>6</number>
+      </property>
+      <item>
+        <widget class="QLabel" name="TextLabel1" >
+          <property name="text" >
+            <string>This is just an example! It doesn't do anything interesting at all.</string>
+          </property>
+          <property name="wordWrap" >
+            <bool>true</bool>
+          </property>
+        </widget>
+      </item>
+      <item>
+        <widget class="QPushButton" name="quit" >
+          <property name="text" >
+            <string>Quit</string>
+          </property>
+        </widget>
+      </item>
+    </layout>
+  </widget>
+</ui>
diff --git a/src/qtopia/main.cpp b/src/qtopia/main.cpp
new file mode 100644 (file)
index 0000000..0d113bf
--- /dev/null
@@ -0,0 +1,19 @@
+/****************************************************************************
+**
+** Copyright (C) 2000-$THISYEAR$ $TROLLTECH$. All rights reserved.
+**
+** This file is part of the $MODULE$ of the Qtopia Toolkit.
+**
+** $TROLLTECH_DUAL_LICENSE$
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#include "example.h"
+#include <qtopia/qtopiaapplication.h>
+
+QTOPIA_ADD_APPLICATION("example", Example)
+QTOPIA_MAIN
+
diff --git a/src/qtopia/qtopia.pro b/src/qtopia/qtopia.pro
new file mode 100644 (file)
index 0000000..4972eb7
--- /dev/null
@@ -0,0 +1,4 @@
+# Input
+HEADERS += example.h
+FORMS += examplebase.ui
+SOURCES += example.cpp main.cpp