QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński
2015-12-15 06:58:54 +01:00
committed by wmayer
parent e55ba2d24d
commit d5c074f80d
61 changed files with 191 additions and 191 deletions

View File

@@ -336,7 +336,7 @@ Application::Application(bool GUIenabled)
ParameterGrp::handle hPGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp");
hPGrp = hPGrp->GetGroup("Preferences")->GetGroup("General");
QString lang = QLocale::languageToString(QLocale::system().language());
Translator::instance()->activateLanguage(hPGrp->GetASCII("Language", (const char*)lang.toAscii()).c_str());
Translator::instance()->activateLanguage(hPGrp->GetASCII("Language", (const char*)lang.toLatin1()).c_str());
GetWidgetFactorySupplier();
ParameterGrp::handle hUnits = App::GetApplication().GetParameterGroupByPath
@@ -1105,7 +1105,7 @@ bool Application::activateWorkbench(const char* name)
pos = rx.indexIn(msg);
}
Base::Console().Error("%s\n", (const char*)msg.toAscii());
Base::Console().Error("%s\n", (const char*)msg.toLatin1());
Base::Console().Log("%s\n", e.getStackTrace().c_str());
if (!d->startingUp) {
wc.restoreCursor();
@@ -1122,7 +1122,7 @@ QPixmap Application::workbenchIcon(const QString& wb) const
{
Base::PyGILStateLocker lock;
// get the python workbench object from the dictionary
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toAscii());
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toLatin1());
// test if the workbench exists
if (pcWorkbench) {
// make a unique icon name
@@ -1196,7 +1196,7 @@ QString Application::workbenchToolTip(const QString& wb) const
{
// get the python workbench object from the dictionary
Base::PyGILStateLocker lock;
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toAscii());
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toLatin1());
// test if the workbench exists
if (pcWorkbench) {
// get its ToolTip member if possible
@@ -1220,7 +1220,7 @@ QString Application::workbenchMenuText(const QString& wb) const
{
// get the python workbench object from the dictionary
Base::PyGILStateLocker lock;
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toAscii());
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toLatin1());
// test if the workbench exists
if (pcWorkbench) {
// get its ToolTip member if possible