From 580662426b8b734566b37de61deccf5b89970c6e Mon Sep 17 00:00:00 2001
From: Manuel Nickschas
Date: Sun, 14 Feb 2010 21:53:24 +0100
Subject: [PATCH] Some cleanups, debug output--
---
src/qtui/inputwidget.cpp | 12 ++++++------
src/qtui/inputwidget.h | 8 ++++----
src/uisupport/multilineedit.cpp | 11 +++--------
src/uisupport/multilineedit.h | 2 +-
4 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp
index a8771721..9fab60cb 100644
--- a/src/qtui/inputwidget.cpp
+++ b/src/qtui/inputwidget.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -85,9 +85,9 @@ InputWidget::InputWidget(QWidget *parent)
_colorFillMenu->addAction(pix, tr("Clear Color"))->setData("");
ui.textcolorButton->setMenu(_colorMenu);
- connect(_colorMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorChoosen(QAction*)));
+ connect(_colorMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorChosen(QAction*)));
ui.highlightcolorButton->setMenu(_colorFillMenu);
- connect(_colorFillMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorHighlightChoosen(QAction*)));
+ connect(_colorFillMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorHighlightChosen(QAction*)));
new TabCompleter(ui.inputEdit);
@@ -432,7 +432,7 @@ void InputWidget::fontChanged(const QFont &f)
ui.underlineButton->setChecked(f.underline());
}
-void InputWidget::colorChoosen(QAction * action) {
+void InputWidget::colorChosen(QAction *action) {
QTextCharFormat fmt;
QColor color;
if (qVariantValue(action->data()) == "") {
@@ -450,7 +450,7 @@ void InputWidget::colorChoosen(QAction * action) {
ui.textcolorButton->setIcon(createColorToolButtonIcon(SmallIcon("format-text-color"), color));
}
-void InputWidget::colorHighlightChoosen(QAction * action) {
+void InputWidget::colorHighlightChosen(QAction *action) {
QTextCharFormat fmt;
QColor color;
if (qVariantValue(action->data()) == "") {
@@ -496,7 +496,7 @@ void InputWidget::on_showStyleButton_toggled(bool checked) {
}
}
-QIcon InputWidget::createColorToolButtonIcon(const QIcon &icon, QColor color) {
+QIcon InputWidget::createColorToolButtonIcon(const QIcon &icon, const QColor &color) {
QPixmap pixmap(16, 16);
pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
diff --git a/src/qtui/inputwidget.h b/src/qtui/inputwidget.h
index c29b3ed6..e5d6c1de 100644
--- a/src/qtui/inputwidget.h
+++ b/src/qtui/inputwidget.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -76,8 +76,8 @@ private slots:
void on_boldButton_clicked(bool checked);
void on_italicButton_clicked(bool checked);
void on_underlineButton_clicked(bool checked);
- void colorChoosen(QAction * action);
- void colorHighlightChoosen(QAction * action);
+ void colorChosen(QAction *action);
+ void colorHighlightChosen(QAction *action);
private:
Ui::InputWidget ui;
@@ -90,7 +90,7 @@ private:
void fontChanged(const QFont &f);
void colorChanged(const QColor &fg);
void colorHighlightChanged(const QColor &bg);
- QIcon createColorToolButtonIcon(const QIcon &icon, QColor color);
+ QIcon createColorToolButtonIcon(const QIcon &icon, const QColor &color);
QTextCharFormat getFormatOfWordOrSelection();
void setFormatOnWordOrSelection(const QTextCharFormat &format);
};
diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp
index 1001ba97..53341f7a 100644
--- a/src/uisupport/multilineedit.cpp
+++ b/src/uisupport/multilineedit.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2005/06 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -318,8 +318,6 @@ void MultiLineEdit::keyPressEvent(QKeyEvent *event) {
}
QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
- qWarning() << text;
-
QRegExp regexHtmlContent = QRegExp("(.*)
", Qt::CaseInsensitive);
regexHtmlContent.setMinimal(true);
@@ -337,7 +335,6 @@ QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
if (regexHtmlContent.indexIn((text)) > -1) {
htmlContent = regexHtmlContent.cap(1);
- qWarning() << htmlContent;
QStringList lines = htmlContent.split("
");
for (int i=0; i < lines.count(); i++) {
line = line2 = lines[i];
@@ -404,10 +401,8 @@ QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
line.replace(">",">");
line.replace(""","\"");
- qWarning() << line;
- qWarning() << line2;
- result << line;
- }
+ result << line;
+ }
}
return result.join("\n");
}
diff --git a/src/uisupport/multilineedit.h b/src/uisupport/multilineedit.h
index 999487a4..ac2f2001 100644
--- a/src/uisupport/multilineedit.h
+++ b/src/uisupport/multilineedit.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2010 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
--
2.20.1