Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII

* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
This commit is contained in:
baldurk
2017-05-02 22:58:12 +01:00
parent 474ba91d8b
commit 0ecc6ca877
50 changed files with 2076 additions and 1921 deletions
+8 -8
View File
@@ -45,7 +45,7 @@ void ReplayManager::OpenCapture(const QString &logfile, float *progress)
return;
m_ProxyRenderer = -1;
m_ReplayHost = "";
m_ReplayHost = QString();
m_Logfile = logfile;
m_Progress = progress;
@@ -163,16 +163,16 @@ void ReplayManager::ListFolder(QString path, bool synchronous, DirectoryBrowseCa
QString ReplayManager::CopyCaptureToRemote(const QString &localpath, QWidget *window)
{
if(!m_Remote)
return "";
return QString();
QString remotepath = "";
QString remotepath;
bool copied = false;
float progress = 0.0f;
auto lambda = [this, localpath, &remotepath, &progress, &copied](IReplayController *r) {
QMutexLocker autolock(&m_RemoteLock);
remotepath = m_Remote->CopyCaptureToRemote(localpath.toUtf8().data(), &progress);
remotepath = ToQStr(m_Remote->CopyCaptureToRemote(localpath.toUtf8().data(), &progress));
copied = true;
};
@@ -188,8 +188,8 @@ QString ReplayManager::CopyCaptureToRemote(const QString &localpath, QWidget *wi
thread->start();
}
ShowProgressDialog(window, QApplication::translate("ReplayManager", "Transferring..."),
[&copied]() { return copied; }, [&progress]() { return progress; });
ShowProgressDialog(window, tr("Transferring..."), [&copied]() { return copied; },
[&progress]() { return progress; });
return remotepath;
}
@@ -221,8 +221,8 @@ void ReplayManager::CopyCaptureFromRemote(const QString &remotepath, const QStri
thread->start();
}
ShowProgressDialog(window, QApplication::translate("ReplayManager", "Transferring..."),
[&copied]() { return copied; }, [&progress]() { return progress; });
ShowProgressDialog(window, tr("Transferring..."), [&copied]() { return copied; },
[&progress]() { return progress; });
}
bool ReplayManager::IsRunning()