Remove uses of deprecated QString::fromAscii

This commit is contained in:
Olivier Goffart 2017-12-08 11:13:44 +01:00
parent a4816d6a8c
commit 8c652e061d
4 changed files with 4 additions and 4 deletions

View file

@ -308,7 +308,7 @@ void SettingsDialog::customizeStyle()
QString altBase(palette().alternateBase().color().name());
QString dark(palette().dark().color().name());
QString background(palette().base().color().name());
_toolBar->setStyleSheet(QString::fromAscii(TOOLBAR_CSS).arg(background, dark, highlightColor, altBase));
_toolBar->setStyleSheet(QString::fromLatin1(TOOLBAR_CSS).arg(background, dark, highlightColor, altBase));
Q_FOREACH (QAction *a, _actionGroup->actions()) {
QIcon icon = createColorAwareIcon(a->property("iconPath").toString());

View file

@ -270,7 +270,7 @@ void SocketApi::slotReadSocket()
QString line = QString::fromUtf8(socket->readLine()).normalized(QString::NormalizationForm_C);
line.chop(1); // remove the '\n'
qCInfo(lcSocketApi) << "Received SocketAPI message <--" << line << "from" << socket;
QByteArray command = line.split(":").value(0).toAscii();
QByteArray command = line.split(":").value(0).toLatin1();
QByteArray functionWithArguments = "command_" + command + "(QString,SocketListener*)";
int indexOfMethod = staticMetaObject.indexOfMethod(functionWithArguments);

View file

@ -136,7 +136,7 @@ void SyncRunFileLog::logItem(const SyncFileItem &item)
if (item._direction == SyncFileItem::None) {
return;
}
QString ts = QString::fromAscii(item._responseTimeStamp);
QString ts = QString::fromLatin1(item._responseTimeStamp);
if (ts.length() > 6) {
QRegExp rx("(\\d\\d:\\d\\d:\\d\\d)");
if (ts.contains(rx)) {

View file

@ -303,7 +303,7 @@ QString Theme::gitSHA1() const
.arg(gitSha1.left(6))
.arg(__DATE__)
.arg(__TIME__)
.arg(QString::fromAscii(qVersion()))
.arg(qVersion())
.arg(QSslSocket::sslLibraryVersionString());
#endif
return devString;