_messageProcessor(0),
_coreAccountModel(new CoreAccountModel(this)),
_coreConnection(new CoreConnection(this)),
- _connected(false),
- _debugLog(&_debugLogBuffer)
+ _connected(false)
{
_signalProxy->synchronize(_ircListHelper);
}
if (bufferSyncer() && id.isValid())
bufferSyncer()->requestMarkBufferAsRead(id);
}
-
-
-#if QT_VERSION < 0x050000
-void Client::logMessage(QtMsgType type, const char *msg)
-{
- fprintf(stderr, "%s\n", msg);
- fflush(stderr);
- if (type == QtFatalMsg) {
- Quassel::logFatalMessage(msg);
- }
- else {
- QString msgString = QString("%1\n").arg(msg);
-
- //Check to see if there is an instance around, else we risk recursions
- //when calling instance() and creating new ones.
- if (!instanceExists())
- return;
-
- instance()->_debugLog << msgString;
- emit instance()->logUpdated(msgString);
- }
-}
-#else
-void Client::logMessage(QtMsgType type, const QMessageLogContext &context, const QString &msg)
-{
- Q_UNUSED(context);
-
- fprintf(stderr, "%s\n", msg.toLocal8Bit().constData());
- fflush(stderr);
- if (type == QtFatalMsg) {
- Quassel::logFatalMessage(msg.toLocal8Bit().constData());
- }
- else {
- QString msgString = QString("%1\n").arg(msg);
-
- //Check to see if there is an instance around, else we risk recursions
- //when calling instance() and creating new ones.
- if (!instanceExists())
- return;
-
- instance()->_debugLog << msgString;
- emit instance()->logUpdated(msgString);
- }
-}
-#endif
static void mergeBuffersPermanently(BufferId bufferId1, BufferId bufferId2);
static void purgeKnownBufferIds();
-#if QT_VERSION < 0x050000
- static void logMessage(QtMsgType type, const char *msg);
-#else
- static void logMessage(QtMsgType, const QMessageLogContext&, const QString&);
-#endif
- static inline const QString &debugLog() { return instance()->_debugLogBuffer; }
-
signals:
void requestNetworkStates();
bool _connected;
static Quassel::Features _coreFeatures;
- QString _debugLogBuffer;
- QTextStream _debugLog;
-
QList<QPair<BufferInfo, QString> > _userInputBuffer;
friend class CoreConnection;
{
setConnectionProperties(settings);
- _debug = Quassel::isOptionSet("debug");
-
QSqlDatabase db = logDb();
if (!db.isValid() || !db.isOpen())
return NotAvailable;
bool AbstractSqlStorage::watchQuery(QSqlQuery &query)
{
bool queryError = query.lastError().isValid();
- if (queryError || _debug) {
+ if (queryError) {
if (queryError)
qCritical() << "unhandled Error in QSqlQuery!";
qCritical() << " last Query:\n" << qPrintable(query.lastQuery());
coreinfodlg.cpp
debugbufferviewoverlay.cpp
debugconsole.cpp
- debuglogwidget.cpp
debugmessagemodelfilter.cpp
inputwidget.cpp
ircconnectionwizard.cpp
coreinfodlg.ui
debugbufferviewoverlay.ui
debugconsole.ui
- debuglogwidget.ui
inputwidget.ui
msgprocessorstatuswidget.ui
nicklistwidget.ui
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-2014 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
- ***************************************************************************/
-
-#include "debuglogwidget.h"
-
-#include "client.h"
-
-DebugLogWidget::DebugLogWidget(QWidget *parent)
- : QWidget(parent)
-{
- ui.setupUi(this);
- setAttribute(Qt::WA_DeleteOnClose, true);
- ui.textEdit->setPlainText(Client::debugLog());
- connect(Client::instance(), SIGNAL(logUpdated(const QString &)), this, SLOT(logUpdated(const QString &)));
- ui.textEdit->setReadOnly(true);
-}
-
-
-void DebugLogWidget::logUpdated(const QString &msg)
-{
- ui.textEdit->moveCursor(QTextCursor::End);
- ui.textEdit->insertPlainText(msg);
- ui.textEdit->moveCursor(QTextCursor::End);
-}
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2005-2014 by the Quassel Project *
- * devel@quassel-irc.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) version 3. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
- ***************************************************************************/
-
-#ifndef DEBUGLOGWIDGET_H
-#define DEBUGLOGWIDGET_H
-
-#include "ui_debuglogwidget.h"
-
-class DebugLogWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- DebugLogWidget(QWidget *parent = 0);
-
-private slots:
- void logUpdated(const QString &msg);
-
-private:
- Ui::DebugLogWidget ui;
-};
-
-
-#endif //DEBUGLOGWIDGET_H
#include "coreinfodlg.h"
#include "contextmenuactionprovider.h"
#include "debugbufferviewoverlay.h"
-#include "debuglogwidget.h"
#include "debugmessagemodelfilter.h"
#include "flatproxymodel.h"
#include "inputwidget.h"
this, SLOT(on_actionDebugMessageModel_triggered())));
coll->addAction("DebugHotList", new Action(KIcon("tools-report-bug"), i18n("Debug &HotList"), coll,
this, SLOT(on_actionDebugHotList_triggered())));
- coll->addAction("DebugLog", new Action(KIcon("tools-report-bug"), i18n("Debug &Log"), coll,
- this, SLOT(on_actionDebugLog_triggered())));
coll->addAction("ReloadStyle", new Action(KIcon("view-refresh"), i18n("Reload Stylesheet"), coll,
QtUi::style(), SLOT(reload()), QKeySequence::Refresh));
-
coll->addAction("HideCurrentBuffer", new Action(i18n("Hide Current Buffer"), coll,
this, SLOT(hideCurrentBuffer()), QKeySequence::Close));
_helpDebugMenu->addAction(coll->action("DebugBufferViewOverlay"));
_helpDebugMenu->addAction(coll->action("DebugMessageModel"));
_helpDebugMenu->addAction(coll->action("DebugHotList"));
- _helpDebugMenu->addAction(coll->action("DebugLog"));
_helpDebugMenu->addSeparator();
_helpDebugMenu->addAction(coll->action("ReloadStyle"));
}
-void MainWin::on_actionDebugLog_triggered()
-{
- DebugLogWidget *logWidget = new DebugLogWidget(0);
- logWidget->show();
-}
-
-
void MainWin::showStatusBarMessage(const QString &message)
{
statusBar()->showMessage(message, 10000);
void on_actionDebugBufferViewOverlay_triggered();
void on_actionDebugMessageModel_triggered();
void on_actionDebugHotList_triggered();
- void on_actionDebugLog_triggered();
void bindJumpKey();
void onJumpKey();
disableCrashhandler();
setRunMode(Quassel::ClientOnly);
-
-#if QT_VERSION < 0x050000
- qInstallMsgHandler(Client::logMessage);
-#else
- qInstallMessageHandler(Client::logMessage);
-#endif
}
+++ /dev/null
-<ui version="4.0" >
- <class>DebugLogWidget</class>
- <widget class="QWidget" name="DebugLogWidget" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Debug Log</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout" >
- <property name="spacing" >
- <number>0</number>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <widget class="QTextEdit" name="textEdit" />
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton" >
- <property name="text" >
- <string>Close</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>pushButton</sender>
- <signal>clicked()</signal>
- <receiver>DebugLogWidget</receiver>
- <slot>close()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>217</x>
- <y>284</y>
- </hint>
- <hint type="destinationlabel" >
- <x>179</x>
- <y>-16</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>