From: Manuel Nickschas Date: Tue, 29 Apr 2008 22:39:15 +0000 (+0000) Subject: Merging r780:797 from trunk to branches/0.3. X-Git-Tag: 0.3.0~425^2~12 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=1736d7414b96efc1189e56f22bd0407989c3a7c9 Merging r780:797 from trunk to branches/0.3. --- diff --git a/build/buildconf.pri b/build/buildconf.pri index 81591bed..ddda143d 100644 --- a/build/buildconf.pri +++ b/build/buildconf.pri @@ -7,15 +7,18 @@ release { CONFIG *= debug } -sputdev { - DEFINES *= SPUTDEV -} - -win32:static { - CONFIG = release warn_on uic resources qt windows static +win32 { + CONFIG = warn_on uic resources qt silent windows + static { + CONFIG += release static + } } mac:Tiger { QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk CONFIG += x86 ppc } + +sputdev { + DEFINES *= SPUTDEV +} diff --git a/dev-notes/QT4_TARGET_DIRECTORIES b/dev-notes/QT4_TARGET_DIRECTORIES new file mode 100644 index 00000000..2cfa624a --- /dev/null +++ b/dev-notes/QT4_TARGET_DIRECTORIES @@ -0,0 +1 @@ +src/tools/moc src/tools/rcc src/tools/uic src/corelib src/xml src/network src/sql src/plugins/codecs src/script diff --git a/dev-notes/build-static-qt.txt b/dev-notes/build-static-qt.txt new file mode 100644 index 00000000..084f2c14 --- /dev/null +++ b/dev-notes/build-static-qt.txt @@ -0,0 +1,25 @@ +[16:35:11] 1.) +[16:35:12] ./configure -no-accessibility -qt-sql-sqlite -no-qt3support +-no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -nomake demos -nomake +examples -nomake gui -nomake uic -nomake opengl -nomake tools -no-opengl +-no-sm -no-xshape -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender +-no-fontconfig -no-tablet -no-xkb +[16:35:31] 2.) +[16:35:31] $ cat QT4_TARGET_DIRECTORIES +[16:35:31] src/tools/moc src/tools/rcc src/tools/uic src/corelib src/xml src/network src/sql src/plugins/codecs src/script +[16:35:38] so eine datei ist sehr hilfreich +[16:35:40] und dann im src dir: +[16:36:21] for i in `cat /home/irc/QT4_TARGET_DIRECTORIES`; do make -C $i; done +[16:36:28] naja... +[16:36:33] $pfad halt :) +[16:36:50] das ganze kannste dann noch mit "make install" machen + +for static core: +./configure -static -no-accessibility -qt-sql-sqlite -qt-zlib -no-qt3support \ +-no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -nomake demos -nomake examples \ +-nomake gui -nomake uic -nomake opengl -nomake tools -no-opengl -no-sm -no-xshape \ +-no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-tablet \ +-no-xkb -no-glib -no-svg -openssl-linked -no-phonon -no-webkit -no-dbus -no-xmlpatterns \ +-prefix /usr/local/Trolltech/qt-4.4-static + +for i in `cat /home/sputnick/devel/quassel/dev-notes/QT4_TARGET_DIRECTORIES`; do make -C $i; done diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index bec3edf1..940feb7f 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -33,7 +33,6 @@ #include "util.h" // get rid of this (needed for isChannelName) - /***************************************** * Fancy Buffer Items *****************************************/ @@ -70,10 +69,11 @@ bool BufferItem::isActive() const { return qobject_cast(parent())->isActive(); } -bool BufferItem::setActivityLevel(Buffer::ActivityLevel level) { - _activity = level; - emit dataChanged(); - return true; +void BufferItem::setActivityLevel(Buffer::ActivityLevel level) { + if(_activity != level) { + _activity = level; + emit dataChanged(); + } } void BufferItem::updateActivityLevel(Buffer::ActivityLevel level) { @@ -107,7 +107,8 @@ QVariant BufferItem::data(int column, int role) const { bool BufferItem::setData(int column, const QVariant &value, int role) { switch(role) { case NetworkModel::BufferActivityRole: - return setActivityLevel((Buffer::ActivityLevel)value.toInt()); + setActivityLevel((Buffer::ActivityLevel)value.toInt()); + return true; default: return PropertyMapItem::setData(column, value, role); } diff --git a/src/client/networkmodel.h b/src/client/networkmodel.h index 634c402e..2a342a69 100644 --- a/src/client/networkmodel.h +++ b/src/client/networkmodel.h @@ -72,7 +72,7 @@ public: bool isActive() const; inline Buffer::ActivityLevel activityLevel() const { return _activity; } - bool setActivityLevel(Buffer::ActivityLevel level); + void setActivityLevel(Buffer::ActivityLevel level); void updateActivityLevel(Buffer::ActivityLevel level); void setLastMsgInsert(QDateTime msgDate); diff --git a/src/qtui/chatwidget.cpp b/src/qtui/chatwidget.cpp index 6c2da6ef..f386b8e2 100644 --- a/src/qtui/chatwidget.cpp +++ b/src/qtui/chatwidget.cpp @@ -423,7 +423,11 @@ void ChatWidget::mouseReleaseEvent(QMouseEvent *event) { selectionStart = qMin(dragStartLine, curLine); selectionEnd = qMax(dragStartLine, curLine); // TODO Make X11SelectionMode configurable! +#ifdef Q_WS_X11 + QApplication::clipboard()->setText(selectionToString(), QClipboard::Selection); +#else QApplication::clipboard()->setText(selectionToString()); +#endif break; default: mouseMode = Normal; diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 5e6cfad1..fb610e06 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -269,7 +269,8 @@ void MainWin::setupNickWidget() { addDockWidget(Qt::RightDockWidgetArea, nickDock); ui.menuViews->addAction(nickDock->toggleViewAction()); - connect(nickDock->toggleViewAction(), SIGNAL(triggered(bool)), nickListWidget, SLOT(showWidget(bool))); + // See NickListDock::NickListDock(); + // connect(nickDock->toggleViewAction(), SIGNAL(triggered(bool)), nickListWidget, SLOT(showWidget(bool))); // attach the NickListWidget to the BufferModel and the default selection nickListWidget->setModel(Client::bufferModel()); diff --git a/src/qtui/nicklistwidget.cpp b/src/qtui/nicklistwidget.cpp index ebd1825f..d647b5d8 100644 --- a/src/qtui/nicklistwidget.cpp +++ b/src/qtui/nicklistwidget.cpp @@ -69,21 +69,26 @@ void NickListWidget::currentChanged(const QModelIndex ¤t, const QModelInde BufferId newBufferId = current.data(NetworkModel::BufferIdRole).value(); BufferId oldBufferId = previous.data(NetworkModel::BufferIdRole).value(); - if(bufferType != BufferInfo::ChannelBuffer) { ui.stackedWidget->setCurrentWidget(ui.emptyPage); - QDockWidget *dock_ = dock(); - if(dock_) { - dock_->close(); - } return; - } else { - QDockWidget *dock_ = dock(); - if(dock_ && dock_->toggleViewAction()->isChecked()) { - dock_->show(); - } } + // See NickListDock::NickListDock() below +// if(bufferType != BufferInfo::ChannelBuffer) { +// ui.stackedWidget->setCurrentWidget(ui.emptyPage); +// QDockWidget *dock_ = dock(); +// if(dock_) { +// dock_->close(); +// } +// return; +// } else { +// QDockWidget *dock_ = dock(); +// if(dock_ && dock_->toggleViewAction()->isChecked()) { +// dock_->show(); +// } +// } + if(newBufferId == oldBufferId) return; @@ -163,28 +168,31 @@ QSize NickListWidget::sizeHint() const { NickListDock::NickListDock(const QString &title, QWidget *parent) : QDockWidget(title, parent) { - QAction *toggleView = toggleViewAction(); - disconnect(toggleView, SIGNAL(triggered(bool)), this, 0); - toggleView->setChecked(QtUiSettings().value("ShowNickList", QVariant(true)).toBool()); - - // reconnecting the closebuttons clicked signal to the action - foreach(QAbstractButton *button, findChildren()) { - if(disconnect(button, SIGNAL(clicked()), this, SLOT(close()))) - connect(button, SIGNAL(clicked()), toggleView, SLOT(trigger())); - } + // THIS STUFF IS NEEDED FOR NICKLIST AUTOHIDE... + // AS THIS BRINGS LOTS OF FUCKUPS WITH IT IT'S DEACTIVATED FOR NOW... + +// QAction *toggleView = toggleViewAction(); +// disconnect(toggleView, SIGNAL(triggered(bool)), this, 0); +// toggleView->setChecked(QtUiSettings().value("ShowNickList", QVariant(true)).toBool()); + +// // reconnecting the closebuttons clicked signal to the action +// foreach(QAbstractButton *button, findChildren()) { +// if(disconnect(button, SIGNAL(clicked()), this, SLOT(close()))) +// connect(button, SIGNAL(clicked()), toggleView, SLOT(trigger())); +// } } -NickListDock::~NickListDock() { - QtUiSettings().setValue("ShowNickList", toggleViewAction()->isChecked()); -} - -bool NickListDock::event(QEvent *event) { - switch (event->type()) { - case QEvent::Hide: - case QEvent::Show: - emit visibilityChanged(event->type() == QEvent::Show); - return QWidget::event(event); - default: - return QDockWidget::event(event); - } -} +// NickListDock::~NickListDock() { +// QtUiSettings().setValue("ShowNickList", toggleViewAction()->isChecked()); +// } + +// bool NickListDock::event(QEvent *event) { +// switch (event->type()) { +// case QEvent::Hide: +// case QEvent::Show: +// emit visibilityChanged(event->type() == QEvent::Show); +// return QWidget::event(event); +// default: +// return QDockWidget::event(event); +// } +// } diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index 2da05a96..c5e9b8ec 100644 --- a/src/qtui/nicklistwidget.h +++ b/src/qtui/nicklistwidget.h @@ -69,9 +69,9 @@ class NickListDock : public QDockWidget { public: NickListDock(const QString &title, QWidget *parent = 0); - ~NickListDock(); + // ~NickListDock(); - virtual bool event(QEvent *event); + // virtual bool event(QEvent *event); }; #endif diff --git a/src/qtui/settingspages/networkssettingspage.ui b/src/qtui/settingspages/networkssettingspage.ui index 7eb64488..aae2401c 100644 --- a/src/qtui/settingspages/networkssettingspage.ui +++ b/src/qtui/settingspages/networkssettingspage.ui @@ -161,7 +161,7 @@ Unless you *really* know what you do, leave this as ISO-8859-1! - 0 + 1 @@ -171,8 +171,8 @@ Unless you *really* know what you do, leave this as ISO-8859-1! 0 0 - 244 - 332 + 301 + 326 @@ -337,8 +337,8 @@ Unless you *really* know what you do, leave this as ISO-8859-1! 0 0 - 244 - 332 + 301 + 326 @@ -377,6 +377,13 @@ Unless you *really* know what you do, leave this as ISO-8859-1! true + + + + Service: + + + @@ -387,30 +394,23 @@ Unless you *really* know what you do, leave this as ISO-8859-1! - - + + true - - QLineEdit::Password - - - - - - Service: + Password: - - + + true - - Password: + + QLineEdit::Password diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index fd2b9da9..f3ffbf84 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -23,13 +23,13 @@ #include "client.h" #include "networkmodel.h" -AbstractBufferContainer::AbstractBufferContainer(QWidget *parent) : AbstractItemView(parent), _currentBuffer(0) +AbstractBufferContainer::AbstractBufferContainer(QWidget *parent) + : AbstractItemView(parent), + _currentBuffer(0) { - } AbstractBufferContainer::~AbstractBufferContainer() { - } diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index 75059075..50387363 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -20,8 +20,6 @@ #include "bufferviewfilter.h" -#include - #include "buffermodel.h" #include "client.h" #include "networkmodel.h" @@ -40,6 +38,17 @@ BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, BufferViewConfig * connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(source_rowsInserted(const QModelIndex &, int, int))); setDynamicSortFilter(true); + + loadColors(); +} + +void BufferViewFilter::loadColors() { + UiSettings s("QtUi/Colors"); + _FgColorInactiveActivity = s.value("inactiveActivityFG", QVariant(QColor(Qt::gray))).value(); + _FgColorNoActivity = s.value("noActivityFG", QVariant(QColor(Qt::black))).value(); + _FgColorHighlightActivity = s.value("highlightActivityFG", QVariant(QColor(Qt::magenta))).value(); + _FgColorNewMessageActivity = s.value("newMessageActivityFG", QVariant(QColor(Qt::green))).value(); + _FgColorOtherActivity = s.value("otherActivityFG", QVariant(QColor(Qt::darkGreen))).value(); } void BufferViewFilter::setConfig(BufferViewConfig *config) { @@ -230,27 +239,19 @@ QVariant BufferViewFilter::data(const QModelIndex &index, int role) const { } QVariant BufferViewFilter::foreground(const QModelIndex &index) const { - UiSettings s("QtUi/Colors"); - QVariant inactiveActivity = s.value("inactiveActivityFG", QVariant(QColor(Qt::gray))); - QVariant noActivity = s.value("noActivityFG", QVariant(QColor(Qt::black))); - QVariant highlightActivity = s.value("highlightActivityFG", QVariant(QColor(Qt::magenta))); - QVariant newMessageActivity = s.value("newMessageActivityFG", QVariant(QColor(Qt::green))); - QVariant otherActivity = s.value("otherActivityFG", QVariant(QColor(Qt::darkGreen))); - if(!index.data(NetworkModel::ItemActiveRole).toBool()) - return inactiveActivity; + return _FgColorInactiveActivity; Buffer::ActivityLevel activity = (Buffer::ActivityLevel)index.data(NetworkModel::BufferActivityRole).toInt(); if(activity & Buffer::Highlight) - return highlightActivity; + return _FgColorHighlightActivity; if(activity & Buffer::NewMessage) - return newMessageActivity; + return _FgColorNewMessageActivity; if(activity & Buffer::OtherActivity) - return otherActivity; - - return noActivity; + return _FgColorOtherActivity; + return _FgColorNoActivity; } void BufferViewFilter::source_rowsInserted(const QModelIndex &parent, int start, int end) { diff --git a/src/uisupport/bufferviewfilter.h b/src/uisupport/bufferviewfilter.h index 07fec1bf..4715f11a 100644 --- a/src/uisupport/bufferviewfilter.h +++ b/src/uisupport/bufferviewfilter.h @@ -21,6 +21,7 @@ #ifndef BUFFERVIEWFILTER_H_ #define BUFFERVIEWFILTER_H_ +#include #include #include #include @@ -73,6 +74,13 @@ protected: private: QPointer _config; + QColor _FgColorInactiveActivity; + QColor _FgColorNoActivity; + QColor _FgColorHighlightActivity; + QColor _FgColorNewMessageActivity; + QColor _FgColorOtherActivity; + void loadColors(); + bool filterAcceptBuffer(const QModelIndex &) const; bool filterAcceptNetwork(const QModelIndex &) const; void addBuffer(const BufferId &); diff --git a/version.inc b/version.inc index 53e17af9..fc54420b 100644 --- a/version.inc +++ b/version.inc @@ -4,8 +4,8 @@ { using namespace Global; quasselVersion = "0.2.0-beta1-pre"; - quasselDate = "2008-04-21"; - quasselBuild = 786; + quasselDate = "2008-04-29"; + quasselBuild = 797; //! Minimum client build number the core needs clientBuildNeeded = 731;