Some cleanups, debug output--
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 14 Feb 2010 20:53:24 +0000 (21:53 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 14 Feb 2010 20:53:24 +0000 (21:53 +0100)
src/qtui/inputwidget.cpp
src/qtui/inputwidget.h
src/uisupport/multilineedit.cpp
src/uisupport/multilineedit.h

index a877172..9fab60c 100644 (file)
@@ -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  *
  *   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);
   _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);
   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);
 
 
   new TabCompleter(ui.inputEdit);
 
@@ -432,7 +432,7 @@ void InputWidget::fontChanged(const QFont &f)
   ui.underlineButton->setChecked(f.underline());
 }
 
   ui.underlineButton->setChecked(f.underline());
 }
 
-void InputWidget::colorChoosen(QAction * action) {
+void InputWidget::colorChosen(QAction *action) {
   QTextCharFormat fmt;
   QColor color;
   if (qVariantValue<QString>(action->data()) == "") {
   QTextCharFormat fmt;
   QColor color;
   if (qVariantValue<QString>(action->data()) == "") {
@@ -450,7 +450,7 @@ void InputWidget::colorChoosen(QAction * action) {
   ui.textcolorButton->setIcon(createColorToolButtonIcon(SmallIcon("format-text-color"), color));
 }
 
   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<QString>(action->data()) == "") {
   QTextCharFormat fmt;
   QColor color;
   if (qVariantValue<QString>(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);
   QPixmap pixmap(16, 16);
   pixmap.fill(Qt::transparent);
   QPainter painter(&pixmap);
index c29b3ed..e5d6c1d 100644 (file)
@@ -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  *
  *   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 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;
 
 private:
   Ui::InputWidget ui;
@@ -90,7 +90,7 @@ private:
   void fontChanged(const QFont &f);
   void colorChanged(const QColor &fg);
   void colorHighlightChanged(const QColor &bg);
   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);
 };
   QTextCharFormat getFormatOfWordOrSelection();
   void setFormatOnWordOrSelection(const QTextCharFormat &format);
 };
index 1001ba9..53341f7 100644 (file)
@@ -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  *
  *   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) {
 }
 
 QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
-  qWarning() << text;
-
   QRegExp regexHtmlContent = QRegExp("<p.*>(.*)</p>", Qt::CaseInsensitive);
   regexHtmlContent.setMinimal(true);
 
   QRegExp regexHtmlContent = QRegExp("<p.*>(.*)</p>", Qt::CaseInsensitive);
   regexHtmlContent.setMinimal(true);
 
@@ -337,7 +335,6 @@ QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
 
   if (regexHtmlContent.indexIn((text)) > -1) {
     htmlContent = regexHtmlContent.cap(1);
 
   if (regexHtmlContent.indexIn((text)) > -1) {
     htmlContent = regexHtmlContent.cap(1);
-    qWarning() << htmlContent;
     QStringList lines = htmlContent.split("<br />");
     for (int i=0; i < lines.count(); i++) {
       line = line2 = lines[i];
     QStringList lines = htmlContent.split("<br />");
     for (int i=0; i < lines.count(); i++) {
       line = line2 = lines[i];
@@ -404,10 +401,8 @@ QString MultiLineEdit::convertHtmlToMircCodes(const QString &text) {
       line.replace("&gt;",">");
       line.replace("&quot;","\"");
 
       line.replace("&gt;",">");
       line.replace("&quot;","\"");
 
-       qWarning() << line;
-       qWarning() << line2;
-       result << line;
-     }
+      result << line;
+    }
   }
   return result.join("\n");
 }
   }
   return result.join("\n");
 }
index 999487a..ac2f200 100644 (file)
@@ -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  *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *