Commit c6163e74 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use directly remove

parent 7675e4cb
......@@ -77,8 +77,8 @@ int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled )
// NTP Time setting
QString timeServer = ntpServers.first();
if( timeServer.indexOf( QRegExp(QStringLiteral(".*\\(.*\\)$")) ) != -1 ) {
timeServer.replace( QRegExp(QStringLiteral(".*\\(")), QLatin1String("") );
timeServer.replace( QRegExp(QStringLiteral("\\).*")), QLatin1String("") );
timeServer.remove( QRegExp(QStringLiteral(".*\\(")));
timeServer.remove( QRegExp(QStringLiteral("\\).*")));
// Would this be better?: s/^.*\(([^)]*)\).*$/\1/
}
......
......@@ -167,7 +167,7 @@ CFontFilter::CFontFilter(QWidget *parent)
QStringList mimes;
foreach (QString pattern, mime.globPatterns())
mimes.append(pattern.replace("*.", ""));
mimes.append(pattern.remove(QStringLiteral("*.")));
act->setData(mimes);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment