summaryrefslogtreecommitdiff
path: root/quackleio/froggetopt.cpp
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2019-07-19 12:05:36 -0500
committerJohn Fultz <jfultz@wolfram.com>2019-07-19 12:05:36 -0500
commitb6654916b426574a4f576d3511f21a85377746f9 (patch)
treea29c5d92541f1e0c6b418445a18d2f917d760ce8 /quackleio/froggetopt.cpp
parent595735c6fa5c9ed837151947e6ba1fbfdcd3190c (diff)
Fix deprecation errors for Qt 5.13.
Most are Qt4-isms, except where noted. * Replaced QFontMetrics::width with QFontMetrics::horizontalAdvance, conditionally as the latter wasn't even introduced until Qt 5.11. * QColor::light and dark instead of QColor::light and dark. * QString() instead of QString::null. * std::sort instead of qSort * QTreeWidgetItem::setSelected instead of QTreeWidget::setItemSelected. * QFileDialog::setOption(QFileDialog::DontConfirmOverwrite) instead of QFileDialog::setConfirmOverwrite(false). * QDrag::exec instead of QDrag::start.
Diffstat (limited to 'quackleio/froggetopt.cpp')
-rw-r--r--quackleio/froggetopt.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/quackleio/froggetopt.cpp b/quackleio/froggetopt.cpp
index 9131ecc..43f1d6b 100644
--- a/quackleio/froggetopt.cpp
+++ b/quackleio/froggetopt.cpp
@@ -486,14 +486,14 @@ void GetOpt::setSwitch( const Option &o )
Registers an option with the short name \a s and long name \a l to
the parser. If this option is found during parsing the value will
be stored in the string pointed to by \a v. By default \a *v will
- be initialized to \c QString::null.
+ be initialized to \c QString().
*/
void GetOpt::addOption( char s, const QString &l, QString *v )
{
Option opt( OArg1, s, l );
opt.stringValue = v;
addOption( opt );
- *v = QString::null;
+ *v = QString();
}
/**
@@ -548,7 +548,7 @@ opt.parse();
*/
void GetOpt::addRepeatableOption( char s, QStringList *v )
{
- Option opt( ORepeat, s, QString::null );
+ Option opt( ORepeat, s, QString() );
opt.listValue = v;
addOption( opt );
*v = QStringList();
@@ -599,13 +599,13 @@ void GetOpt::addOptionalOption( char s, const QString &l,
opt.stringValue = v;
opt.def = def;
addOption( opt );
- *v = QString::null;
+ *v = QString();
}
/**
Registers a required command line argument \a name. If the argument
is missing parse() will return false to indicate an error and \a *v
- will remain with its default QString::null value. Otherwise \a *v
+ will remain with its default QString() value. Otherwise \a *v
will be set to the value of the argument.
Example:
@@ -634,7 +634,7 @@ void GetOpt::addArgument( const QString &name, QString *v )
opt.stringValue = v;
reqArg = opt;
++numReqArgs;
- *v = QString::null;
+ *v = QString();
}
/**
@@ -648,7 +648,7 @@ void GetOpt::addOptionalArgument( const QString &name, QString *v )
opt.stringValue = v;
optArg = opt;
++numOptArgs;
- *v = QString::null;
+ *v = QString();
}
/**