diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-12-26 21:13:18 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-07-14 20:01:11 (GMT) |
commit | 333c7c44f1aa3c62f9401b190e45eaff15056d5c (patch) | |
tree | 254eee541a9f98d560667a05a3222d2f0a921e3e /addon/doxywizard/inputbool.cpp | |
parent | c33e03f3cb9f0ae1c00b7e785964c915f4085fe0 (diff) | |
download | Doxygen-333c7c44f1aa3c62f9401b190e45eaff15056d5c.zip Doxygen-333c7c44f1aa3c62f9401b190e45eaff15056d5c.tar.gz Doxygen-333c7c44f1aa3c62f9401b190e45eaff15056d5c.tar.bz2 |
Make doxywizard compatible with Qt5
Diffstat (limited to 'addon/doxywizard/inputbool.cpp')
-rw-r--r-- | addon/doxywizard/inputbool.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index ec2035a..ef71dd9 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -14,7 +14,11 @@ #include "inputbool.h" #include "helplabel.h" -#include <QtGui> + +#include <QCheckBox> +#include <QTextStream> +#include <QTextCodec> +#include <QGridLayout> InputBool::InputBool( QGridLayout *layout, int &row, const QString &id, bool checked, @@ -73,11 +77,11 @@ void InputBool::updateDefault() { if (m_state==m_default || !m_lab->isEnabled()) { - m_lab->setText(QString::fromAscii("<qt>")+m_id+QString::fromAscii("</qt")); + m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt")); } else { - m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>")); + m_lab->setText(QString::fromLatin1("<qt><font color='red'>")+m_id+QString::fromLatin1("</font></qt>")); } } @@ -89,9 +93,9 @@ QVariant &InputBool::value() void InputBool::update() { QString v = m_value.toString().toLower(); - m_state = (v==QString::fromAscii("yes") || - v==QString::fromAscii("true") || - v==QString::fromAscii("1")); + m_state = (v==QString::fromLatin1("yes") || + v==QString::fromLatin1("true") || + v==QString::fromLatin1("1")); m_cb->setChecked( m_state ); updateDefault(); updateDependencies(); @@ -105,8 +109,8 @@ void InputBool::reset() void InputBool::writeValue(QTextStream &t,QTextCodec *codec) { if (m_state) - t << codec->fromUnicode(QString::fromAscii("YES")); + t << codec->fromUnicode(QString::fromLatin1("YES")); else - t << codec->fromUnicode(QString::fromAscii("NO")); + t << codec->fromUnicode(QString::fromLatin1("NO")); } |