Qt5: 'endl' manipulator is deprecated with 5.15. Replace it with newlines.
This commit is contained in:
@@ -61,7 +61,7 @@ void Assistant::showDocumentation(const QString &page)
|
||||
if (!page.isEmpty()) {
|
||||
QTextStream str(proc);
|
||||
str << QLatin1String("setSource qthelp://org.freecad.usermanual/doc/")
|
||||
<< page << QLatin1Char('\n') << endl;
|
||||
<< page << QLatin1String("\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,12 +149,12 @@ void AutoSaver::saveDocument(const std::string& name, AutoSaveProperty& saver)
|
||||
if (file.open(QFile::WriteOnly)) {
|
||||
QTextStream str(&file);
|
||||
str.setCodec("UTF-8");
|
||||
str << "<?xml version='1.0' encoding='utf-8'?>" << endl
|
||||
<< "<AutoRecovery SchemaVersion=\"1\">" << endl;
|
||||
str << " <Status>Created</Status>" << endl;
|
||||
str << " <Label>" << QString::fromUtf8(doc->Label.getValue()) << "</Label>" << endl; // store the document's current label
|
||||
str << " <FileName>" << QString::fromUtf8(doc->FileName.getValue()) << "</FileName>" << endl; // store the document's current filename
|
||||
str << "</AutoRecovery>" << endl;
|
||||
str << "<?xml version='1.0' encoding='utf-8'?>\n"
|
||||
<< "<AutoRecovery SchemaVersion=\"1\">\n";
|
||||
str << " <Status>Created</Status>\n";
|
||||
str << " <Label>" << QString::fromUtf8(doc->Label.getValue()) << "</Label>\n"; // store the document's current label
|
||||
str << " <FileName>" << QString::fromUtf8(doc->FileName.getValue()) << "</FileName>\n"; // store the document's current filename
|
||||
str << "</AutoRecovery>\n";
|
||||
file.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -337,9 +337,9 @@ void StdCmdFreezeViews::onSaveViews()
|
||||
QTextStream str(&file);
|
||||
ActionGroup* pcAction = qobject_cast<ActionGroup*>(_pcAction);
|
||||
QList<QAction*> acts = pcAction->actions();
|
||||
str << "<?xml version='1.0' encoding='utf-8'?>" << endl
|
||||
<< "<FrozenViews SchemaVersion=\"1\">" << endl;
|
||||
str << " <Views Count=\"" << savedViews <<"\">" << endl;
|
||||
str << "<?xml version='1.0' encoding='utf-8'?>\n"
|
||||
<< "<FrozenViews SchemaVersion=\"1\">\n";
|
||||
str << " <Views Count=\"" << savedViews <<"\">\n";
|
||||
|
||||
for (QList<QAction*>::ConstIterator it = acts.begin()+offset; it != acts.end(); ++it) {
|
||||
if ( !(*it)->isVisible() )
|
||||
@@ -356,11 +356,11 @@ void StdCmdFreezeViews::onSaveViews()
|
||||
viewPos = lines.join(QString::fromLatin1(" "));
|
||||
}
|
||||
|
||||
str << " <Camera settings=\"" << viewPos.toLatin1().constData() << "\"/>" << endl;
|
||||
str << " <Camera settings=\"" << viewPos.toLatin1().constData() << "\"/>\n";
|
||||
}
|
||||
|
||||
str << " </Views>" << endl;
|
||||
str << "</FrozenViews>" << endl;
|
||||
str << " </Views>\n";
|
||||
str << "</FrozenViews>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -362,28 +362,28 @@ void DocumentRecoveryPrivate::writeRecoveryInfo(const DocumentRecoveryPrivate::I
|
||||
if (file.open(QFile::WriteOnly)) {
|
||||
QTextStream str(&file);
|
||||
str.setCodec("UTF-8");
|
||||
str << "<?xml version='1.0' encoding='utf-8'?>" << endl
|
||||
<< "<AutoRecovery SchemaVersion=\"1\">" << endl;
|
||||
str << "<?xml version='1.0' encoding='utf-8'?>\n"
|
||||
<< "<AutoRecovery SchemaVersion=\"1\">\n";
|
||||
switch (info.status) {
|
||||
case Created:
|
||||
str << " <Status>Created</Status>" << endl;
|
||||
str << " <Status>Created</Status>\n";
|
||||
break;
|
||||
case Overage:
|
||||
str << " <Status>Deprecated</Status>" << endl;
|
||||
str << " <Status>Deprecated</Status>\n";
|
||||
break;
|
||||
case Success:
|
||||
str << " <Status>Success</Status>" << endl;
|
||||
str << " <Status>Success</Status>\n";
|
||||
break;
|
||||
case Failure:
|
||||
str << " <Status>Failure</Status>" << endl;
|
||||
str << " <Status>Failure</Status>\n";
|
||||
break;
|
||||
default:
|
||||
str << " <Status>Unknown</Status>" << endl;
|
||||
str << " <Status>Unknown</Status>\n";
|
||||
break;
|
||||
}
|
||||
str << " <Label>" << info.label << "</Label>" << endl;
|
||||
str << " <FileName>" << info.fileName << "</FileName>" << endl;
|
||||
str << "</AutoRecovery>" << endl;
|
||||
str << " <Label>" << info.label << "</Label>\n";
|
||||
str << " <FileName>" << info.fileName << "</FileName>\n";
|
||||
str << "</AutoRecovery>\n";
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,38 +770,38 @@ void AboutDialog::on_copyButton_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
str << "OS: " << SystemInfo::getOperatingSystem() << deskInfo << endl;
|
||||
str << "OS: " << SystemInfo::getOperatingSystem() << deskInfo << '\n';
|
||||
|
||||
int wordSize = SystemInfo::getWordSizeOfOS();
|
||||
if (wordSize > 0) {
|
||||
str << "Word size of OS: " << wordSize << "-bit" << endl;
|
||||
str << "Word size of OS: " << wordSize << "-bit\n";
|
||||
}
|
||||
str << "Word size of " << exe << ": " << QSysInfo::WordSize << "-bit" << endl;
|
||||
str << "Word size of " << exe << ": " << QSysInfo::WordSize << "-bit\n";
|
||||
str << "Version: " << major << "." << minor << "." << build;
|
||||
char *appimage = getenv("APPIMAGE");
|
||||
if (appimage)
|
||||
str << " AppImage";
|
||||
str << endl;
|
||||
str << '\n';
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
str << "Build type: Debug" << endl;
|
||||
str << "Build type: Debug\n";
|
||||
#elif defined(NDEBUG)
|
||||
str << "Build type: Release" << endl;
|
||||
str << "Build type: Release\n";
|
||||
#elif defined(CMAKE_BUILD_TYPE)
|
||||
str << "Build type: " << CMAKE_BUILD_TYPE << endl;
|
||||
str << "Build type: " << CMAKE_BUILD_TYPE << '\n';
|
||||
#else
|
||||
str << "Build type: Unknown" << endl;
|
||||
str << "Build type: Unknown\n";
|
||||
#endif
|
||||
it = config.find("BuildRevisionBranch");
|
||||
if (it != config.end())
|
||||
str << "Branch: " << QString::fromUtf8(it->second.c_str()) << endl;
|
||||
str << "Branch: " << QString::fromUtf8(it->second.c_str()) << '\n';
|
||||
it = config.find("BuildRevisionHash");
|
||||
if (it != config.end())
|
||||
str << "Hash: " << it->second.c_str() << endl;
|
||||
str << "Hash: " << it->second.c_str() << '\n';
|
||||
// report also the version numbers of the most important libraries in FreeCAD
|
||||
str << "Python version: " << PY_VERSION << endl;
|
||||
str << "Qt version: " << QT_VERSION_STR << endl;
|
||||
str << "Coin version: " << COIN_VERSION << endl;
|
||||
str << "Python version: " << PY_VERSION << '\n';
|
||||
str << "Qt version: " << QT_VERSION_STR << '\n';
|
||||
str << "Coin version: " << COIN_VERSION << '\n';
|
||||
#if defined(HAVE_OCC_VERSION)
|
||||
str << "OCC version: "
|
||||
<< OCC_VERSION_MAJOR << "."
|
||||
@@ -810,12 +810,12 @@ void AboutDialog::on_copyButton_clicked()
|
||||
#ifdef OCC_VERSION_DEVELOPMENT
|
||||
<< "." OCC_VERSION_DEVELOPMENT
|
||||
#endif
|
||||
<< endl;
|
||||
<< '\n';
|
||||
#endif
|
||||
QLocale loc;
|
||||
str << "Locale: " << loc.languageToString(loc.language()) << "/"
|
||||
<< loc.countryToString(loc.country())
|
||||
<< " (" << loc.name() << ")" << endl;
|
||||
<< " (" << loc.name() << ")\n";
|
||||
|
||||
QClipboard* cb = QApplication::clipboard();
|
||||
cb->setText(data);
|
||||
|
||||
Reference in New Issue
Block a user