+before_install:
+ - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+ - sudo add-apt-repository -y ppa:kalakris/cmake
+ - sudo apt-add-repository -y ppa:beineri/opt-qt521
+ - sudo apt-get -qq update
+
+install:
+ - sudo apt-get install -q gcc-4.7 g++-4.7
+ - if [ "$CXX" = "clang" ]; then sudo apt-get install -q clang-3.4; fi
+ - sudo apt-get install -q cmake
+ - sudo apt-get install -q qt52base qt52webkit qt52tools qt52script
+ - if [ "$CXX" = "g++" ]; then export CXX="g++-4.7" CC="gcc-4.7"; fi
+
language: cpp
+
compiler:
- - gcc
+ - gcc
- clang
-before_install:
- - sudo add-apt-repository ppa:kalakris/cmake/test -y
- - sudo apt-get update -qq
- - sudo apt-get install cmake
- - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- - sudo apt-get update -qq
- - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.7; fi
- - if [ "$CXX" = "g++" ]; then export CXX="g++-4.7" CC="gcc-4.7"; fi
-
-script: mkdir build && cd build && cmake ../ && make
+env:
+ - QT_VERSION=qt4
+ - QT_VERSION=qt5
+
+script:
+ - mkdir build
+ - cd build
+ - if [ "$QT_VERSION" = "qt4" ]; then cmake ..; fi
+ - if [ "$QT_VERSION" = "qt5" ]; then source /opt/qt52/bin/qt52-env.sh && cmake -DUSE_QT5=ON ..; fi
+ - make
\ No newline at end of file
On first run of the Quassel core, it will wait for a client to connect
and present a first-run wizard that will allow you to create the database
-and one admin user for the core-side storage. Note that Quassel does not
-support the administration of user accounts yet, this includes adding
-more users, changing passwords and so on.
-However, you can add more users, or change passwords of existing ones,
-using manageusers.py to be found in the scripts/ directory.
+and one admin user for the core-side storage.
+
+To add more users, run: `quasselcore --add-user`
+To change the password of an existing user: `quasselcore --change-userpass=username`
+The manageusers.py script is deprecated.
IRC is the preferred means of getting in touch with the developers.
The Quassel IRC Team can be contacted on Freenode/#quassel (or
# Let's just hope that all gccs support these options and skip the tests...
# -fno-strict-aliasing is needed apparently for Qt < 4.6
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wnon-virtual-dtor -fno-strict-aliasing")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wnon-virtual-dtor -fno-strict-aliasing -Wundef -Wcast-align -Wpointer-arith -Wformat-security -fno-check-new -fno-common")
# set(CMAKE_CXX_FLAGS_RELEASE "-O2") # use CMake default
# set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O2") # use CMake default
set(CMAKE_CXX_FLAGS_DEBUG "-g -ggdb -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -ggdb -fno-inline")
set(CMAKE_CXX_FLAGS_PROFILE "-g3 -ggdb -fno-inline -ftest-coverage -fprofile-arcs")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -W -Wall -Wextra -Wnon-virtual-dtor -fno-strict-aliasing -Wundef -Wcast-align -Wpointer-arith -Wformat-security -fno-check-new -fno-common")
-
check_cxx_compiler_flag(-Woverloaded-virtual CXX_W_OVERLOADED_VIRTUAL)
if(CXX_W_OVERLOADED_VIRTUAL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual")
+++ /dev/null
-Qt5 Support in Quassel IRC
-==========================
-
-As the Qt5 alpha release is around the corner, I've started to play around with it
-mostly to see how much effort the porting of Quassel would be. It turns out that there
-was no porting effort at all; after adding support for it in the build system
-(which led me to clean up a lot of the Qt4-related mess that has been in there forever),
-fixing some bugs that were hidden before, and cleaning up some #includes, all of the code
-seems to just compile and mostly work. In particular, none of our black voodoo and QMeta
-abuse broke with Qt5. Additionally, you can freely combine both Qt4 and Qt5 clients and cores.
-Well done, Qt Team!
-
-To enable building against Qt5, pass -DWITH_QT5=1 to cmake. Note that Qt5 (the bindir) needs
-to be in your current $PATH unless you have installed Qt5 into one of the usual system locations.
-
-At this time there are a few known issues:
-
-* Some of our optional dependencies don't exist in Qt5 versions and thus need to be disabled
- (most of them are forcibly disabled in the build system). This includes QCA (QtCrypto) support,
- DBusMenu, libindicate, and unfortunately also KDE. As new versions of those show up, we'll
- enable them again.
-
-* The Quassel UI looks rather fugly with Qt5, at least on my box, as there are no style plugins, no
- themes, no desktop integration. Well, enough for a proof of concept, I guess.
-
-* The CMake files for Phonon shipped with Qt5 are buggy, so linking fails. No Phonon support at
- this time.
-
-* SSL does not seem to work in the server currently. You might have to pass -DWITH_OPENSSL=0 to cmake
- to make it work at all (try this if you don't get a connection from your client).
-
-So, feel free to play around, let me know about issues, but be aware that this is not in any way
-tested or supported at this time.
-
-Cheers,
-~ Sputnick
QList<ClientBufferViewConfig *> bufferViewConfigList = clientBufferViewManager->clientBufferViewConfigs();
foreach(ClientBufferViewConfig *bufferViewConfig, bufferViewConfigList) {
if (bufferViewConfig->temporarilyRemovedBuffers().contains(newBufId)) {
- bufferViewConfig->addBuffer(newBufId, bufferViewConfig->bufferList().length());
+ bufferViewConfig->requestAddBuffer(newBufId, bufferViewConfig->bufferList().length());
//if (bufferViewConfig->sortAlphabetically()) {
// TODO we need to trigger a sort here, but can't reach the model required
// to get a bufferviewfilter, as the bufferviewmanager only managers configs
struct ClientRegistered : public HandshakeMessage
{
- inline ClientRegistered(quint32 coreFeatures, bool coreConfigured, const QVariantList &backendInfo, bool sslSupported, const QDateTime &coreStartTime)
+ inline ClientRegistered(quint32 coreFeatures, bool coreConfigured, const QVariantList &backendInfo, bool sslSupported, const QString &coreInfo)
: coreFeatures(coreFeatures)
, coreConfigured(coreConfigured)
, backendInfo(backendInfo)
, sslSupported(sslSupported)
- , coreStartTime(coreStartTime)
+ , coreInfo(coreInfo)
{}
quint32 coreFeatures;
// this is only used by the LegacyProtocol in compat mode
bool sslSupported;
- QDateTime coreStartTime;
+ QString coreInfo;
};
}
else if (msgType == "ClientInitAck") {
- handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), false, QDateTime())); // SupportsSsl and coreStartTime obsolete
+ handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), false, QString())); // SupportsSsl and coreInfo obsolete
}
else if (msgType == "CoreSetupData") {
***************************************************************************/
#include <QHostAddress>
+#include <QDataStream>
#include <QTcpSocket>
#include "legacypeer.h"
-#include "quassel.h"
/* version.inc is no longer used for this */
const uint protocolVersion = 10;
socket()->setProperty("UseCompression", true);
#endif
- handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["SupportSsl"].toBool(), QDateTime()));
+ handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["SupportSsl"].toBool(), QString()));
}
else if (msgType == "CoreSetupData") {
m["SupportsCompression"] = socket()->property("UseCompression").toBool(); // this property gets already set in the ClientInit handler
// This is only used for old v10 clients (pre-0.5)
- int uptime = msg.coreStartTime.secsTo(QDateTime::currentDateTime().toUTC());
- int updays = uptime / 86400; uptime %= 86400;
- int uphours = uptime / 3600; uptime %= 3600;
- int upmins = uptime / 60;
- m["CoreInfo"] = tr("<b>Quassel Core Version %1</b><br>"
- "Built: %2<br>"
- "Up %3d%4h%5m (since %6)").arg(Quassel::buildInfo().fancyVersionString)
- .arg(Quassel::buildInfo().buildDate)
- .arg(updays).arg(uphours, 2, 10, QChar('0')).arg(upmins, 2, 10, QChar('0')).arg(msg.coreStartTime.toString(Qt::TextDate));
+ m["CoreInfo"] = msg.coreInfo;
m["LoginEnabled"] = m["Configured"] = msg.coreConfigured;
return false; // trigger setup process
if (storage->setup(settings))
return initStorage(backend, settings, false);
- // if setup wasn't successfull we mark the backend as unavailable
+ // if initialization wasn't successful, we quit to keep from coming up unconfigured
case Storage::NotAvailable:
- qCritical() << "Selected storage backend is not available:" << backend;
- storage->deleteLater();
- _storageBackends.remove(backend);
- storage = 0;
- return false;
+ qCritical() << "FATAL: Selected storage backend is not available:" << backend;
+ exit(EXIT_FAILURE);
case Storage::IsReady:
// delete all other backends
_storageBackends.remove(backend);
if (!configured)
backends = Core::backendInfo();
- // useSsl and startTime are only used for the legacy protocol
- _peer->dispatch(ClientRegistered(Quassel::features(), configured, backends, useSsl, Core::instance()->startTime()));
+ int uptime = Core::instance()->startTime().secsTo(QDateTime::currentDateTime().toUTC());
+ int updays = uptime / 86400; uptime %= 86400;
+ int uphours = uptime / 3600; uptime %= 3600;
+ int upmins = uptime / 60;
+ QString coreInfo = tr("<b>Quassel Core Version %1</b><br>"
+ "Built: %2<br>"
+ "Up %3d%4h%5m (since %6)").arg(Quassel::buildInfo().fancyVersionString)
+ .arg(Quassel::buildInfo().buildDate)
+ .arg(updays).arg(uphours, 2, 10, QChar('0')).arg(upmins, 2, 10, QChar('0')).arg(Core::instance()->startTime().toString(Qt::TextDate));
+
+ // useSsl and coreInfo are only used for the legacy protocol
+ _peer->dispatch(ClientRegistered(Quassel::features(), configured, backends, useSsl, coreInfo));
if (_legacy && useSsl)
startSsl();
connect(this, SIGNAL(newEvent(Event *)), coreSession()->eventManager(), SLOT(postEvent(Event *)));
if (Quassel::isOptionSet("oidentd")) {
- connect(this, SIGNAL(socketInitialized(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Qt::BlockingQueuedConnection);
+ connect(this, SIGNAL(socketOpen(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Qt::BlockingQueuedConnection);
connect(this, SIGNAL(socketDisconnected(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(removeSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)));
}
}
void CoreNetwork::socketInitialized()
{
+ CoreIdentity *identity = identityPtr();
+ if (!identity) {
+ qCritical() << "Identity invalid!";
+ disconnectFromIrc();
+ return;
+ }
+
+ emit socketOpen(identity, localAddress(), localPort(), peerAddress(), peerPort());
+
Server server = usedServer();
#ifdef HAVE_SSL
if (server.useSsl && !socket.isEncrypted())
#if QT_VERSION >= 0x040600
socket.setSocketOption(QAbstractSocket::KeepAliveOption, true);
#endif
- CoreIdentity *identity = identityPtr();
- if (!identity) {
- qCritical() << "Identity invalid!";
- disconnectFromIrc();
- return;
- }
emit socketInitialized(identity, localAddress(), localPort(), peerAddress(), peerPort());
void sslErrors(const QVariant &errorData);
void newEvent(Event *event);
+ void socketOpen(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
void socketInitialized(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
void socketDisconnected(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
bufferInfo = Core::bufferInfo(user(), rawMsg.networkId, BufferInfo::StatusBuffer, "");
}
Message msg(bufferInfo, rawMsg.type, rawMsg.text, rawMsg.sender, rawMsg.flags);
- Core::storeMessage(msg);
- emit displayMsg(msg);
+ if(Core::storeMessage(msg))
+ emit displayMsg(msg);
}
else {
QHash<NetworkId, QHash<QString, BufferInfo> > bufferInfoCache;
messages << msg;
}
- Core::storeMessages(messages);
- // FIXME: extend protocol to a displayMessages(MessageList)
- for (int i = 0; i < messages.count(); i++) {
- emit displayMsg(messages[i]);
+ if(Core::storeMessages(messages)) {
+ // FIXME: extend protocol to a displayMessages(MessageList)
+ for (int i = 0; i < messages.count(); i++) {
+ emit displayMsg(messages[i]);
+ }
}
}
_processMessages = false;
// For example, blowfish-ebc seems to create 8-char chunks.
static const char *cmd = "PRIVMSG";
- static const char *splitter = " .,-";
+ static const char *splitter = " .,-!?";
int maxSplitPos = message.count();
int splitPos = maxSplitPos;
inline CoreNetwork *coreNetwork() const { return qobject_cast<CoreNetwork *>(parent()); }
void handleUserInput(const BufferInfo &bufferInfo, const QString &text);
+ int lastParamOverrun(const QString &cmd, const QList<QByteArray> ¶ms);
public slots:
void handleAway(const BufferInfo &bufferInfo, const QString &text);
void doMode(const BufferInfo& bufferInfo, const QChar &addOrRemove, const QChar &mode, const QString &nickList);
void banOrUnban(const BufferInfo &bufferInfo, const QString &text, bool ban);
void putPrivmsg(const QByteArray &target, const QByteArray &message, Cipher *cipher = 0);
- int lastParamOverrun(const QString &cmd, const QList<QByteArray> ¶ms);
#ifdef HAVE_QCA2
QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = 0) const;
#include "coresession.h"
#include "ctcpevent.h"
#include "messageevent.h"
+#include "coreuserinputhandler.h"
const QByteArray XDELIM = "\001";
{
QList<QByteArray> params;
params << net->serverEncode(bufname) << lowLevelQuote(pack(net->serverEncode(ctcpTag), net->userEncode(bufname, message)));
+
+ static const char *splitter = " .,-!?";
+ int maxSplitPos = message.count();
+ int splitPos = maxSplitPos;
+
+ int overrun = net->userInputHandler()->lastParamOverrun("PRIVMSG", params);
+ if (overrun) {
+ maxSplitPos = message.count() - overrun -2;
+ splitPos = -1;
+ for (const char *splitChar = splitter; *splitChar != 0; splitChar++) {
+ splitPos = qMax(splitPos, message.lastIndexOf(*splitChar, maxSplitPos) + 1); // keep split char on old line
+ }
+ if (splitPos <= 0 || splitPos > maxSplitPos)
+ splitPos = maxSplitPos;
+
+ params = params.mid(0, 1) << lowLevelQuote(pack(net->serverEncode(ctcpTag), net->userEncode(bufname, message.left(splitPos))));
+ }
net->putCmd("PRIVMSG", params);
+
+ if (splitPos < message.count())
+ query(net, bufname, ctcpTag, message.mid(splitPos));
}
if (limit != -1)
params << limit;
else
- params << "ALL";
+ params << QVariant(QVariant::Int);
QSqlQuery query = executePreparedQuery(queryName, params, db);
"<dt><b>Terje \"tan\" Andersen</b></dt><dd>Norwegian translation, documentation</dd>"
"<dt><b>Jens \"amiconn\" Arnold</b></dt><dd>Postgres migration fixes</dd>"
"<dt><b>Adolfo Jayme Barrientos</b></dt><dd>Spanish translation</dd>"
+ "<dt><b>Mattia Basaglia</b></dt><dd>Fixes</dd>"
"<dt><b>Pete \"elbeardmorez\" Beardmore</b></dt><dd>Linewrap for input line</dd>"
"<dt><b>Rafael \"EagleScreen\" Belmonte</b></dt><dd>Spanish translation</dd>"
"<dt><b>Sergiu Bivol</b></dt><dd>Romanian translation</dd>"
"<dt><b>Johannes \"j0hu\" Huber</b></dt><dd>Many fixes and features, bug triaging</dd>"
"<dt><b>Theofilos Intzoglou</b></dt><dd>Greek translation</dd>"
"<dt><b>Jovan Jojkić</b></dt><dd>Serbian translation</dd>"
+ "<dt><b>Allan Jude</b></dt><dd>Documentation improvements</dd>"
"<dt><b>Michael \"ycros\" Kedzierski</b></dt><dd>Mac fixes</dd>"
"<dt><b>Scott \"ScottK\" Kitterman<b></dt><dd>Kubuntu nightly packager, (packaging/build system) bughunter</dd>"
"<dt><b>Paul \"Haudrauf\" Klumpp</b></dt><dd>Initial design and mainwindow layout</dd>"
"<dt><b>Michael \"mamarley\" Marley</b></dt><dd>Various fixes and improvements</dd>"
"<dt><b>Martin \"m4yer\" Mayer</b></dt><dd>German translation</dd>"
"<dt><b>Daniel \"hydrogen\" Meltzer</b></dt><dd>Various fixes and improvements</dd>"
+ "<dt><b>Sebastian Meyer</b></dt><dd>Fixes</dd>"
"<dt><b>Daniel E. Moctezuma</b></dt><dd>Japanese translation</dd>"
"<dt><b>Chris \"kode54\" Moeller</b></dt><dd>Various fixes and improvements</dd>"
"<dt><b>Thomas Müller</b></dt><dd>Fixes, Debian packaging</dd>"
"<dt><b>Dirk \"MarcLandis\" Rettschlag</b></dt><dd>Various fixes and new features</dd>"
"<dt><b>Miguel Revilla</b></dt><dd>Spanish translation</dd>"
"<dt><b>Jaak Ristioja</b></dt><dd>Fixes</dd>"
+ "<dt><b>David \"Bombe\" Roden</b></dt><dd>Fixes</dd>"
"<dt><b>Henning \"honk\" Rohlfs</b></dt><dd>Various fixes</dd>"
"<dt><b>Stella \"differentreality\" Rouzi</b></dt><dd>Greek translation</dd>"
"<dt><b>\"salnx\"</b></dt><dd>Highlight configuration improvements</dd>"
"<dt><b>Tim \"xAFFE\" Schumacher</b></dt><dd>Fixes and feedback</dd>"
"<dt><b>\"sfionov\"</b></dt><dd>Russian translation</dd>"
"<dt><b>Harald \"apachelogger\" Sitter</b></dt><dd>{ku|U}buntu packager, motivator, promoter</dd>"
+ "<dt><b>Ramanathan Sivagurunathan</b></dt><dd>Fixes</dd>"
"<dt><b>Stefanos Sofroniou</b></dt><dd>Greek translation</dd>"
"<dt><b>Rüdiger \"ruediger\" Sonderfeld</b></dt><dd>Emacs keybindings</dd>"
"<dt><b>Alexander Stein</b></dt><dd>Tray icon fix</dd>"
"<dt><b>\"ToBeFree\"</b></dt><dd>German translation</dd>"
"<dt><b>Edward \"Aides\" Toroshchin</b></dt><dd>Russian translation</dd>"
"<dt><b>Adam \"adamt\" Tulinius</b></dt><dd>Early beta tester and bughunter, Danish translation</dd>"
+ "<dt><b>Deniz Türkoglu</b></dt><dd>Mac fixes</dd>"
"<dt><b>Frederik M.J. \"freqmod\" Vestre</b></dt><dd>Norwegian translation</dd>"
"<dt><b>Atte Virtanen</b></dt><dd>Finnish translation</dd>"
"<dt><b>Pavel \"int\" Volkovitskiy</b></dt><dd>Early beta tester and bughunter</dd>"
#endif
}
-#ifdef Q_OS_MAC
void MainWin::saveMainToolBarStatus(bool enabled)
{
+#ifdef Q_OS_MAC
QtUiSettings uiSettings;
uiSettings.setValue("ShowMainToolBar", enabled);
-}
+#else
+ Q_UNUSED(enabled);
#endif
+}
void MainWin::connectedToCore()
void saveMenuBarStatus(bool enabled);
void saveStatusBarStatus(bool enabled);
-#ifdef Q_OS_MAC
void saveMainToolBarStatus(bool enabled);
-#endif
void loadLayout();
void saveLayout();