Prefix textstream operators with Qt::
As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
185ba7f4cf
commit
343528841e
@ -226,7 +226,7 @@ void CborDiagnosticDumper::saveFile(QIODevice *f, const QVariant &contents, cons
|
||||
|
||||
QTextStream out(f);
|
||||
out << convertFromVariant(contents, Double).toDiagnosticNotation(opts)
|
||||
<< endl;
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
CborConverter::CborConverter()
|
||||
|
@ -66,7 +66,7 @@ static void dumpVariant(QTextStream &out, const QVariant &v)
|
||||
case QVariant::String: {
|
||||
const QStringList list = v.toStringList();
|
||||
for (const QString &s : list)
|
||||
out << s << endl;
|
||||
out << s << Qt::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -80,11 +80,11 @@ static void dumpVariant(QTextStream &out, const QVariant &v)
|
||||
}
|
||||
|
||||
case QMetaType::Nullptr:
|
||||
out << "(null)" << endl;
|
||||
out << "(null)" << Qt::endl;
|
||||
break;
|
||||
|
||||
default:
|
||||
out << v.toString() << endl;
|
||||
out << v.toString() << Qt::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -54,10 +54,10 @@ void parseHtmlFile(QTextStream &out, const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
|
||||
out << "Analysis of HTML file: " << fileName << endl;
|
||||
out << "Analysis of HTML file: " << fileName << Qt::endl;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
out << " Couldn't open the file." << endl << endl << endl;
|
||||
out << " Couldn't open the file." << Qt::endl << Qt::endl << Qt::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -85,22 +85,22 @@ void parseHtmlFile(QTextStream &out, const QString &fileName)
|
||||
//! [2]
|
||||
if (reader.hasError()) {
|
||||
out << " The HTML file isn't well-formed: " << reader.errorString()
|
||||
<< endl << endl << endl;
|
||||
<< Qt::endl << Qt::endl << Qt::endl;
|
||||
return;
|
||||
}
|
||||
//! [2]
|
||||
|
||||
out << " Title: \"" << title << '"' << endl
|
||||
<< " Number of paragraphs: " << paragraphCount << endl
|
||||
<< " Number of links: " << links.size() << endl
|
||||
<< " Showing first few links:" << endl;
|
||||
out << " Title: \"" << title << '"' << Qt::endl
|
||||
<< " Number of paragraphs: " << paragraphCount << Qt::endl
|
||||
<< " Number of links: " << links.size() << Qt::endl
|
||||
<< " Showing first few links:" << Qt::endl;
|
||||
|
||||
while (links.size() > 5)
|
||||
links.removeLast();
|
||||
|
||||
for (const QString &link : qAsConst(links))
|
||||
out << " " << link << endl;
|
||||
out << endl << endl;
|
||||
out << " " << link << Qt::endl;
|
||||
out << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -541,7 +541,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData());
|
||||
QTextStream mkt(&mkf);
|
||||
writeHeader(mkt);
|
||||
mkt << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
mkt << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl;
|
||||
project->values("QMAKE_MAKE_QMAKE_EXTRA_COMMANDS")
|
||||
<< "@echo 'warning: Xcode project has been regenerated, custom settings have been lost. " \
|
||||
"Use CONFIG+=no_autoqmake to prevent this behavior in the future, " \
|
||||
@ -740,15 +740,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData());
|
||||
QTextStream mkt(&mkf);
|
||||
writeHeader(mkt);
|
||||
mkt << "MOC = " << var("QMAKE_MOC") << endl;
|
||||
mkt << "UIC = " << var("QMAKE_UIC") << endl;
|
||||
mkt << "LEX = " << var("QMAKE_LEX") << endl;
|
||||
mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl;
|
||||
mkt << "YACC = " << var("QMAKE_YACC") << endl;
|
||||
mkt << "YACCFLAGS = " << var("QMAKE_YACCFLAGS") << endl;
|
||||
mkt << "MOC = " << var("QMAKE_MOC") << Qt::endl;
|
||||
mkt << "UIC = " << var("QMAKE_UIC") << Qt::endl;
|
||||
mkt << "LEX = " << var("QMAKE_LEX") << Qt::endl;
|
||||
mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << Qt::endl;
|
||||
mkt << "YACC = " << var("QMAKE_YACC") << Qt::endl;
|
||||
mkt << "YACCFLAGS = " << var("QMAKE_YACCFLAGS") << Qt::endl;
|
||||
mkt << "DEFINES = "
|
||||
<< varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
|
||||
<< varGlue("DEFINES","-D"," -D","") << endl;
|
||||
<< varGlue("DEFINES","-D"," -D","") << Qt::endl;
|
||||
mkt << "INCPATH =";
|
||||
{
|
||||
const ProStringList &incs = project->values("INCLUDEPATH");
|
||||
@ -757,9 +757,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS"))
|
||||
mkt << " " << var("QMAKE_FRAMEWORKPATH_FLAGS");
|
||||
mkt << endl;
|
||||
mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
|
||||
mkt << "MOVE = " << var("QMAKE_MOVE") << endl << endl;
|
||||
mkt << Qt::endl;
|
||||
mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl;
|
||||
mkt << "MOVE = " << var("QMAKE_MOVE") << Qt::endl << Qt::endl;
|
||||
mkt << "preprocess: compilers\n";
|
||||
mkt << "clean preprocess_clean: compiler_clean\n\n";
|
||||
writeExtraTargets(mkt);
|
||||
@ -789,7 +789,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
}
|
||||
}
|
||||
mkt << endl;
|
||||
mkt << Qt::endl;
|
||||
writeExtraCompilerTargets(mkt);
|
||||
writingUnixMakefileGenerator = false;
|
||||
}
|
||||
@ -994,12 +994,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
tmp = project->values("SUBLIBS");
|
||||
for(int i = 0; i < tmp.count(); i++)
|
||||
t << escapeFilePath("tmp/lib" + tmp[i] + ".a") << ' ';
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
mkt << "sublibs: $(SUBLIBS)\n\n";
|
||||
tmp = project->values("SUBLIBS");
|
||||
for(int i = 0; i < tmp.count(); i++)
|
||||
t << escapeFilePath("tmp/lib" + tmp[i] + ".a") + ":\n\t"
|
||||
<< var(ProKey("MAKELIB" + tmp[i])) << endl << endl;
|
||||
<< var(ProKey("MAKELIB" + tmp[i])) << Qt::endl << Qt::endl;
|
||||
mkt.flush();
|
||||
mkf.close();
|
||||
writingUnixMakefileGenerator = false;
|
||||
|
@ -994,25 +994,25 @@ MakefileGenerator::writePrlFile(QTextStream &t)
|
||||
QString bdir = Option::output_dir;
|
||||
if(bdir.isEmpty())
|
||||
bdir = qmake_getpwd();
|
||||
t << "QMAKE_PRL_BUILD_DIR =" << qv(bdir) << endl;
|
||||
t << "QMAKE_PRL_BUILD_DIR =" << qv(bdir) << Qt::endl;
|
||||
|
||||
t << "QMAKE_PRO_INPUT =" << qv(project->projectFile().section('/', -1)) << endl;
|
||||
t << "QMAKE_PRO_INPUT =" << qv(project->projectFile().section('/', -1)) << Qt::endl;
|
||||
|
||||
if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
|
||||
t << "QMAKE_PRL_SOURCE_DIR =" << qv(project->first("QMAKE_ABSOLUTE_SOURCE_PATH")) << endl;
|
||||
t << "QMAKE_PRL_TARGET =" << qv(project->first("LIB_TARGET")) << endl;
|
||||
t << "QMAKE_PRL_SOURCE_DIR =" << qv(project->first("QMAKE_ABSOLUTE_SOURCE_PATH")) << Qt::endl;
|
||||
t << "QMAKE_PRL_TARGET =" << qv(project->first("LIB_TARGET")) << Qt::endl;
|
||||
if(!project->isEmpty("PRL_EXPORT_DEFINES"))
|
||||
t << "QMAKE_PRL_DEFINES =" << qv(project->values("PRL_EXPORT_DEFINES")) << endl;
|
||||
t << "QMAKE_PRL_DEFINES =" << qv(project->values("PRL_EXPORT_DEFINES")) << Qt::endl;
|
||||
if(!project->isEmpty("PRL_EXPORT_CFLAGS"))
|
||||
t << "QMAKE_PRL_CFLAGS =" << qv(project->values("PRL_EXPORT_CFLAGS")) << endl;
|
||||
t << "QMAKE_PRL_CFLAGS =" << qv(project->values("PRL_EXPORT_CFLAGS")) << Qt::endl;
|
||||
if(!project->isEmpty("PRL_EXPORT_CXXFLAGS"))
|
||||
t << "QMAKE_PRL_CXXFLAGS =" << qv(project->values("PRL_EXPORT_CXXFLAGS")) << endl;
|
||||
t << "QMAKE_PRL_CXXFLAGS =" << qv(project->values("PRL_EXPORT_CXXFLAGS")) << Qt::endl;
|
||||
if(!project->isEmpty("CONFIG"))
|
||||
t << "QMAKE_PRL_CONFIG =" << qv(project->values("CONFIG")) << endl;
|
||||
t << "QMAKE_PRL_CONFIG =" << qv(project->values("CONFIG")) << Qt::endl;
|
||||
if(!project->isEmpty("TARGET_VERSION_EXT"))
|
||||
t << "QMAKE_PRL_VERSION = " << project->first("TARGET_VERSION_EXT") << endl;
|
||||
t << "QMAKE_PRL_VERSION = " << project->first("TARGET_VERSION_EXT") << Qt::endl;
|
||||
else if(!project->isEmpty("VERSION"))
|
||||
t << "QMAKE_PRL_VERSION = " << project->first("VERSION") << endl;
|
||||
t << "QMAKE_PRL_VERSION = " << project->first("VERSION") << Qt::endl;
|
||||
if(project->isActiveConfig("staticlib") || project->isActiveConfig("explicitlib")) {
|
||||
ProStringList libs;
|
||||
if (!project->isActiveConfig("staticlib"))
|
||||
@ -1022,7 +1022,7 @@ MakefileGenerator::writePrlFile(QTextStream &t)
|
||||
t << "QMAKE_PRL_LIBS =";
|
||||
for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
|
||||
t << qv(project->values((*it).toKey()));
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1055,15 +1055,15 @@ MakefileGenerator::writeProjectMakefile()
|
||||
t << "install: ";
|
||||
for(it = targets.begin(); it != targets.end(); ++it)
|
||||
t << (*it)->target << "-install ";
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
//uninstall
|
||||
t << "uninstall: ";
|
||||
for(it = targets.begin(); it != targets.end(); ++it)
|
||||
t << (*it)->target << "-uninstall ";
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
} else {
|
||||
t << "first: " << targets.first()->target << endl
|
||||
t << "first: " << targets.first()->target << Qt::endl
|
||||
<< "install: " << targets.first()->target << "-install\n"
|
||||
<< "uninstall: " << targets.first()->target << "-uninstall\n";
|
||||
}
|
||||
@ -1072,7 +1072,7 @@ MakefileGenerator::writeProjectMakefile()
|
||||
if(!project->isActiveConfig("no_autoqmake")) {
|
||||
QString mkf = escapeDependencyPath(fileFixify(Option::output.fileName()));
|
||||
for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it)
|
||||
t << escapeDependencyPath((*it)->makefile) << ": " << mkf << endl;
|
||||
t << escapeDependencyPath((*it)->makefile) << ": " << mkf << Qt::endl;
|
||||
}
|
||||
qDeleteAll(targets);
|
||||
return true;
|
||||
@ -1186,7 +1186,7 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src)
|
||||
p.replace(stringObj, escapeFilePath(dstf));
|
||||
t << "\n\t" << p;
|
||||
}
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1380,14 +1380,14 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
QString tmp_dst = fileFixify((*pit).toQString(), FileFixifyAbsolute, false);
|
||||
t << mkdir_p_asstring(filePrefixRoot(root, tmp_dst)) << "\n\t";
|
||||
}
|
||||
t << target << endl << endl;
|
||||
t << target << Qt::endl << Qt::endl;
|
||||
if(!uninst.isEmpty()) {
|
||||
t << "uninstall_" << (*it) << ": FORCE";
|
||||
for (int i = uninst.size(); --i >= 0; )
|
||||
t << "\n\t" << uninst.at(i);
|
||||
t << "\n\t-$(DEL_DIR) " << escapeFilePath(filePrefixRoot(root, dst)) << " \n\n";
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
if (installConfigValues.indexOf("no_default_install") == -1) {
|
||||
all_installs += QString("install_") + (*it) + " ";
|
||||
@ -1824,7 +1824,7 @@ MakefileGenerator::writeExtraTargets(QTextStream &t)
|
||||
t << escapeDependencyPath(targ) << ":" << deps;
|
||||
if(!cmd.isEmpty())
|
||||
t << "\n\t" << cmd;
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1916,7 +1916,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
FileFixifyFromOutdir));
|
||||
}
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
if (config.indexOf("no_clean") == -1) {
|
||||
QStringList raw_clean = project->values(ProKey(*it + ".clean")).toQStringList();
|
||||
@ -1981,7 +1981,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
}
|
||||
}
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList();
|
||||
if (config.indexOf("combine") != -1) {
|
||||
@ -2065,7 +2065,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
} else {
|
||||
t << " " << valList(escapeDependencyPaths(inputs)) << " " << valList(finalizeDependencyPaths(deps));
|
||||
}
|
||||
t << "\n\t" << cmd << endl << endl;
|
||||
t << "\n\t" << cmd << Qt::endl << Qt::endl;
|
||||
continue;
|
||||
}
|
||||
for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) {
|
||||
@ -2177,10 +2177,10 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
++i;
|
||||
}
|
||||
t << escapeDependencyPath(out) << ": " << valList(finalizeDependencyPaths(deps)) << "\n\t"
|
||||
<< cmd << endl << endl;
|
||||
<< cmd << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
t << "compiler_clean: " << clean_targets << endl << endl;
|
||||
t << "compiler_clean: " << clean_targets << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
void
|
||||
@ -2196,17 +2196,17 @@ MakefileGenerator::writeExtraCompilerVariables(QTextStream &t)
|
||||
first = false;
|
||||
}
|
||||
t << "QMAKE_COMP_" << (*varit) << " = "
|
||||
<< valList(project->values((*varit).toKey())) << endl;
|
||||
<< valList(project->values((*varit).toKey())) << Qt::endl;
|
||||
}
|
||||
}
|
||||
if(!first)
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
void
|
||||
MakefileGenerator::writeExtraVariables(QTextStream &t)
|
||||
{
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
ProStringList outlist;
|
||||
const ProValueMap &vars = project->variables();
|
||||
@ -2220,7 +2220,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t)
|
||||
}
|
||||
if (!outlist.isEmpty()) {
|
||||
t << "####### Custom Variables\n";
|
||||
t << outlist.join('\n') << endl << endl;
|
||||
t << outlist.join('\n') << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2236,11 +2236,11 @@ MakefileGenerator::writeExportedVariables(QTextStream &t)
|
||||
const ProString &name = project->first(ProKey(exp + ".name"));
|
||||
const ProString &value = project->first(ProKey(exp + ".value"));
|
||||
if (!value.isEmpty())
|
||||
t << name << " = " << value << endl;
|
||||
t << name << " = " << value << Qt::endl;
|
||||
else
|
||||
t << name << " =\n";
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2248,7 +2248,7 @@ MakefileGenerator::writeDummyMakefile(QTextStream &t)
|
||||
{
|
||||
if (project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty())
|
||||
return false;
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl;
|
||||
const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
@ -2264,7 +2264,7 @@ MakefileGenerator::writeDummyMakefile(QTextStream &t)
|
||||
bool
|
||||
MakefileGenerator::writeStubMakefile(QTextStream &t)
|
||||
{
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl;
|
||||
const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
@ -2293,22 +2293,22 @@ MakefileGenerator::writeMakefile(QTextStream &t)
|
||||
void
|
||||
MakefileGenerator::writeDefaultVariables(QTextStream &t)
|
||||
{
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
|
||||
t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
|
||||
t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
|
||||
t << "COPY = " << var("QMAKE_COPY") << endl;
|
||||
t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl;
|
||||
t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl;
|
||||
t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl;
|
||||
t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl;
|
||||
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
|
||||
t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << endl;
|
||||
t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << endl;
|
||||
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
|
||||
t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
|
||||
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
|
||||
t << "MOVE = " << var("QMAKE_MOVE") << endl;
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl;
|
||||
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl;
|
||||
t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << Qt::endl;
|
||||
t << "MKDIR = " << var("QMAKE_MKDIR") << Qt::endl;
|
||||
t << "COPY = " << var("QMAKE_COPY") << Qt::endl;
|
||||
t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << Qt::endl;
|
||||
t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << Qt::endl;
|
||||
t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << Qt::endl;
|
||||
t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << Qt::endl;
|
||||
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << Qt::endl;
|
||||
t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << Qt::endl;
|
||||
t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << Qt::endl;
|
||||
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl;
|
||||
t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << Qt::endl;
|
||||
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << Qt::endl;
|
||||
t << "MOVE = " << var("QMAKE_MOVE") << Qt::endl;
|
||||
}
|
||||
|
||||
QString MakefileGenerator::buildArgs(bool withExtra)
|
||||
@ -2349,18 +2349,18 @@ void
|
||||
MakefileGenerator::writeHeader(QTextStream &t)
|
||||
{
|
||||
t << "#############################################################################\n";
|
||||
t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << endl;
|
||||
t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << Qt::endl;
|
||||
t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ")\n";
|
||||
t << "# Project: " << fileFixify(project->projectFile()) << endl;
|
||||
t << "# Template: " << var("TEMPLATE") << endl;
|
||||
t << "# Project: " << fileFixify(project->projectFile()) << Qt::endl;
|
||||
t << "# Template: " << var("TEMPLATE") << Qt::endl;
|
||||
if(!project->isActiveConfig("build_pass"))
|
||||
t << "# Command: " << build_args().replace(QLatin1String("$(QMAKE)"), var("QMAKE_QMAKE")) << endl;
|
||||
t << "# Command: " << build_args().replace(QLatin1String("$(QMAKE)"), var("QMAKE_QMAKE")) << Qt::endl;
|
||||
t << "#############################################################################\n";
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
|
||||
if (ofile.lastIndexOf(Option::dir_sep) != -1)
|
||||
ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1);
|
||||
t << "MAKEFILE = " << escapeFilePath(ofile) << endl << endl;
|
||||
t << "MAKEFILE = " << escapeFilePath(ofile) << Qt::endl << Qt::endl;
|
||||
t << "EQ = =\n\n";
|
||||
}
|
||||
|
||||
@ -2492,7 +2492,7 @@ MakefileGenerator::writeSubDirs(QTextStream &t)
|
||||
void MakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix,
|
||||
const QString &makeArguments)
|
||||
{
|
||||
t << callPrefix << "$(MAKE)" << makeArguments << endl;
|
||||
t << callPrefix << "$(MAKE)" << makeArguments << Qt::endl;
|
||||
}
|
||||
|
||||
void
|
||||
@ -2517,14 +2517,14 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
// blasted includes
|
||||
const ProStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
for (ProStringList::ConstIterator qeui_it = qeui.begin(); qeui_it != qeui.end(); ++qeui_it)
|
||||
t << "include " << (*qeui_it) << endl;
|
||||
t << "include " << (*qeui_it) << Qt::endl;
|
||||
|
||||
if (!(flags & SubTargetSkipDefaultVariables)) {
|
||||
writeDefaultVariables(t);
|
||||
t << "SUBTARGETS = "; // subtargets are sub-directory
|
||||
for(int target = 0; target < targets.size(); ++target)
|
||||
t << " \\\n\t\t" << targets.at(target)->target;
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
writeExtraVariables(t);
|
||||
|
||||
@ -2580,7 +2580,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
if (!dont_recurse)
|
||||
writeSubMakeCall(t, out_directory_cdin, makefilein + " qmake_all");
|
||||
else
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
{ //actually compile
|
||||
@ -2621,7 +2621,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
out_directory_cdin, makefilein + " " + s);
|
||||
}
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
if (!(flags & SubTargetSkipDefaultTargets)) {
|
||||
writeMakeQmake(t, true);
|
||||
@ -2670,7 +2670,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
} else if(suffix == "distclean") {
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl;
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << Qt::endl;
|
||||
t << fixFileVarGlue("QMAKE_DISTCLEAN", "\t-$(DEL_FILE) ", " ", "\n");
|
||||
}
|
||||
}
|
||||
@ -2683,7 +2683,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
cmd = var(ProKey(*qut_it + ".commands")), deps;
|
||||
if(targ.isEmpty())
|
||||
targ = (*qut_it).toQString();
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
const ProStringList &deplist = project->values(ProKey(*qut_it + ".depends"));
|
||||
for (ProStringList::ConstIterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
|
||||
@ -2758,7 +2758,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
deps += " FORCE";
|
||||
t << escapeDependencyPath(Option::fixPathToTargetOS(targ, false)) << ":" << deps << "\n";
|
||||
if(!cmd.isEmpty())
|
||||
t << "\t" << cmd << endl;
|
||||
t << "\t" << cmd << Qt::endl;
|
||||
}
|
||||
|
||||
if(flags & SubTargetInstalls) {
|
||||
@ -2776,7 +2776,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
|
||||
if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) {
|
||||
QStringList files = escapeFilePaths(fileFixify(Option::mkfile::project_files));
|
||||
t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t"
|
||||
<< "@$(QMAKE) -prl " << files.join(' ') << ' ' << buildArgs(true) << endl;
|
||||
<< "@$(QMAKE) -prl " << files.join(' ') << ' ' << buildArgs(true) << Qt::endl;
|
||||
}
|
||||
|
||||
QString qmake = build_args();
|
||||
@ -2795,10 +2795,10 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
|
||||
}
|
||||
const ProStringList &included = escapeDependencyPaths(project->values("QMAKE_INTERNAL_INCLUDED_FILES"));
|
||||
t << included.join(QString(" \\\n\t\t")) << "\n\t"
|
||||
<< qmake << endl;
|
||||
<< qmake << Qt::endl;
|
||||
const ProStringList &extraCommands = project->values("QMAKE_MAKE_QMAKE_EXTRA_COMMANDS");
|
||||
if (!extraCommands.isEmpty())
|
||||
t << "\t" << extraCommands.join(QString("\n\t")) << endl;
|
||||
t << "\t" << extraCommands.join(QString("\n\t")) << Qt::endl;
|
||||
for(int include = 0; include < included.size(); ++include) {
|
||||
const ProString &i = included.at(include);
|
||||
if(!i.isEmpty())
|
||||
@ -2806,7 +2806,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
|
||||
}
|
||||
}
|
||||
if(project->first("QMAKE_ORIG_TARGET") != "qmake") {
|
||||
t << "qmake: FORCE\n\t@" << qmake << endl << endl;
|
||||
t << "qmake: FORCE\n\t@" << qmake << Qt::endl << Qt::endl;
|
||||
if (!noDummyQmakeAll)
|
||||
t << "qmake_all: FORCE\n\n";
|
||||
}
|
||||
@ -3298,11 +3298,11 @@ MakefileGenerator::writePkgConfigFile()
|
||||
if(includeDir.isEmpty())
|
||||
includeDir = prefix + "/include";
|
||||
|
||||
t << "prefix=" << prefix << endl;
|
||||
t << "prefix=" << prefix << Qt::endl;
|
||||
t << "exec_prefix=${prefix}\n"
|
||||
<< "libdir=" << pkgConfigFixPath(libDir) << "\n"
|
||||
<< "includedir=" << pkgConfigFixPath(includeDir) << endl;
|
||||
t << endl;
|
||||
<< "includedir=" << pkgConfigFixPath(includeDir) << Qt::endl;
|
||||
t << Qt::endl;
|
||||
|
||||
//extra PKGCONFIG variables
|
||||
const ProStringList &pkgconfig_vars = project->values("QMAKE_PKGCONFIG_VARIABLES");
|
||||
@ -3323,17 +3323,17 @@ MakefileGenerator::writePkgConfigFile()
|
||||
}
|
||||
}
|
||||
if (!val.isEmpty())
|
||||
t << var << "=" << val << endl;
|
||||
t << var << "=" << val << Qt::endl;
|
||||
}
|
||||
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
QString name = project->first("QMAKE_PKGCONFIG_NAME").toQString();
|
||||
if(name.isEmpty()) {
|
||||
name = project->first("QMAKE_ORIG_TARGET").toQString().toLower();
|
||||
name.replace(0, 1, name[0].toUpper());
|
||||
}
|
||||
t << "Name: " << name << endl;
|
||||
t << "Name: " << name << Qt::endl;
|
||||
QString desc = project->values("QMAKE_PKGCONFIG_DESCRIPTION").join(' ');
|
||||
if(desc.isEmpty()) {
|
||||
if(name.isEmpty()) {
|
||||
@ -3351,12 +3351,12 @@ MakefileGenerator::writePkgConfigFile()
|
||||
desc += " Application";
|
||||
}
|
||||
}
|
||||
t << "Description: " << desc << endl;
|
||||
t << "Description: " << desc << Qt::endl;
|
||||
ProString version = project->first("QMAKE_PKGCONFIG_VERSION");
|
||||
if (version.isEmpty())
|
||||
version = project->first("VERSION");
|
||||
if (!version.isEmpty())
|
||||
t << "Version: " << version << endl;
|
||||
t << "Version: " << version << Qt::endl;
|
||||
|
||||
// libs
|
||||
t << "Libs: ";
|
||||
@ -3393,7 +3393,7 @@ MakefileGenerator::writePkgConfigFile()
|
||||
t << "Libs.private:";
|
||||
for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it)
|
||||
t << ' ' << fixLibFlags((*it).toKey()).join(' ');
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
// flags
|
||||
@ -3411,15 +3411,15 @@ MakefileGenerator::writePkgConfigFile()
|
||||
&& libDir != QLatin1String("/Library/Frameworks")) {
|
||||
t << " -F${libdir}";
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
// requires
|
||||
const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' ');
|
||||
if (!requires.isEmpty()) {
|
||||
t << "Requires: " << requires << endl;
|
||||
t << "Requires: " << requires << Qt::endl;
|
||||
}
|
||||
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
static QString windowsifyPath(const QString &str)
|
||||
|
@ -324,14 +324,14 @@ ProjectGenerator::init()
|
||||
bool
|
||||
ProjectGenerator::writeMakefile(QTextStream &t)
|
||||
{
|
||||
t << "######################################################################" << endl;
|
||||
t << "# Automatically generated by qmake (" QMAKE_VERSION_STR ") " << QDateTime::currentDateTime().toString() << endl;
|
||||
t << "######################################################################" << endl << endl;
|
||||
t << "######################################################################" << Qt::endl;
|
||||
t << "# Automatically generated by qmake (" QMAKE_VERSION_STR ") " << QDateTime::currentDateTime().toString() << Qt::endl;
|
||||
t << "######################################################################" << Qt::endl << Qt::endl;
|
||||
if (!Option::globals->extra_cmds[QMakeEvalBefore].isEmpty())
|
||||
t << Option::globals->extra_cmds[QMakeEvalBefore] << endl;
|
||||
t << Option::globals->extra_cmds[QMakeEvalBefore] << Qt::endl;
|
||||
t << getWritableVar("TEMPLATE_ASSIGN", false);
|
||||
if(project->first("TEMPLATE_ASSIGN") == "subdirs") {
|
||||
t << endl << "# Directories" << "\n"
|
||||
t << Qt::endl << "# Directories" << "\n"
|
||||
<< getWritableVar("SUBDIRS");
|
||||
} else {
|
||||
//figure out target
|
||||
@ -343,7 +343,7 @@ ProjectGenerator::writeMakefile(QTextStream &t)
|
||||
t << getWritableVar("TARGET_ASSIGN")
|
||||
<< getWritableVar("CONFIG", false)
|
||||
<< getWritableVar("CONFIG_REMOVE", false)
|
||||
<< getWritableVar("INCLUDEPATH") << endl;
|
||||
<< getWritableVar("INCLUDEPATH") << Qt::endl;
|
||||
|
||||
t << "# You can make your code fail to compile if you use deprecated APIs.\n"
|
||||
"# In order to do so, uncomment the following line.\n"
|
||||
@ -362,7 +362,7 @@ ProjectGenerator::writeMakefile(QTextStream &t)
|
||||
<< getWritableVar("TRANSLATIONS");
|
||||
}
|
||||
if (!Option::globals->extra_cmds[QMakeEvalAfter].isEmpty())
|
||||
t << Option::globals->extra_cmds[QMakeEvalAfter] << endl;
|
||||
t << Option::globals->extra_cmds[QMakeEvalAfter] << Qt::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -83,8 +83,8 @@ void
|
||||
UnixMakefileGenerator::writeDefaultVariables(QTextStream &t)
|
||||
{
|
||||
MakefileGenerator::writeDefaultVariables(t);
|
||||
t << "TAR = " << var("QMAKE_TAR") << endl;
|
||||
t << "COMPRESS = " << var("QMAKE_GZIP") << endl;
|
||||
t << "TAR = " << var("QMAKE_TAR") << Qt::endl;
|
||||
t << "COMPRESS = " << var("QMAKE_GZIP") << Qt::endl;
|
||||
|
||||
if (project->isEmpty("QMAKE_DISTNAME")) {
|
||||
ProString distname = project->first("QMAKE_ORIG_TARGET");
|
||||
@ -92,13 +92,13 @@ UnixMakefileGenerator::writeDefaultVariables(QTextStream &t)
|
||||
distname += project->first("VERSION");
|
||||
project->values("QMAKE_DISTNAME") = distname;
|
||||
}
|
||||
t << "DISTNAME = " << fileVar("QMAKE_DISTNAME") << endl;
|
||||
t << "DISTNAME = " << fileVar("QMAKE_DISTNAME") << Qt::endl;
|
||||
|
||||
if (project->isEmpty("QMAKE_DISTDIR"))
|
||||
project->values("QMAKE_DISTDIR") = project->first("QMAKE_DISTNAME");
|
||||
t << "DISTDIR = " << escapeFilePath(fileFixify(
|
||||
(project->isEmpty("OBJECTS_DIR") ? ProString(".tmp/") : project->first("OBJECTS_DIR")) + project->first("QMAKE_DISTDIR"),
|
||||
FileFixifyFromOutdir | FileFixifyAbsolute)) << endl;
|
||||
FileFixifyFromOutdir | FileFixifyAbsolute)) << Qt::endl;
|
||||
}
|
||||
|
||||
void
|
||||
@ -106,10 +106,10 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
{
|
||||
MakefileGenerator::writeSubTargets(t, targets, flags);
|
||||
|
||||
t << "dist: distdir FORCE" << endl;
|
||||
t << "dist: distdir FORCE" << Qt::endl;
|
||||
t << "\t(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar)"
|
||||
" && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)";
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
t << "distdir:";
|
||||
for (int target = 0; target < targets.size(); ++target) {
|
||||
@ -118,7 +118,7 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
}
|
||||
t << " FORCE\n\t"
|
||||
<< mkdir_p_asstring("$(DISTDIR)", false) << "\n\t"
|
||||
<< "$(COPY_FILE) --parents " << fileVar("DISTFILES") << " $(DISTDIR)" << Option::dir_sep << endl << endl;
|
||||
<< "$(COPY_FILE) --parents " << fileVar("DISTFILES") << " $(DISTDIR)" << Option::dir_sep << Qt::endl << Qt::endl;
|
||||
|
||||
const QString abs_source_path = project->first("QMAKE_ABSOLUTE_SOURCE_PATH").toQString();
|
||||
for (int target = 0; target < targets.size(); ++target) {
|
||||
@ -151,7 +151,7 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
|
||||
t << subtarget->target << "-distdir: FORCE";
|
||||
writeSubTargetCall(t, in_directory, in, out_directory, escapeFilePath(out),
|
||||
out_directory_cdin, makefilein);
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,11 +183,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
writeExportedVariables(t);
|
||||
|
||||
t << "####### Compiler, tools and options\n\n";
|
||||
t << "CC = " << var("QMAKE_CC") << endl;
|
||||
t << "CXX = " << var("QMAKE_CXX") << endl;
|
||||
t << "CC = " << var("QMAKE_CC") << Qt::endl;
|
||||
t << "CXX = " << var("QMAKE_CXX") << Qt::endl;
|
||||
t << "DEFINES = "
|
||||
<< varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
|
||||
<< varGlue("DEFINES","-D"," -D","") << endl;
|
||||
<< varGlue("DEFINES","-D"," -D","") << Qt::endl;
|
||||
t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n";
|
||||
t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n";
|
||||
t << "INCPATH =";
|
||||
@ -208,38 +208,38 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS"))
|
||||
t << " " << var("QMAKE_FRAMEWORKPATH_FLAGS");
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
writeDefaultVariables(t);
|
||||
|
||||
if(!project->isActiveConfig("staticlib")) {
|
||||
t << "LINK = " << var("QMAKE_LINK") << endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
|
||||
t << "LINK = " << var("QMAKE_LINK") << Qt::endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << Qt::endl;
|
||||
t << "LIBS = $(SUBLIBS) " << fixLibFlags("LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("LIBS_PRIVATE").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl;
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl;
|
||||
}
|
||||
|
||||
t << "AR = " << var("QMAKE_AR") << endl;
|
||||
t << "RANLIB = " << var("QMAKE_RANLIB") << endl;
|
||||
t << "SED = " << var("QMAKE_STREAM_EDITOR") << endl;
|
||||
t << "STRIP = " << var("QMAKE_STRIP") << endl;
|
||||
t << "AR = " << var("QMAKE_AR") << Qt::endl;
|
||||
t << "RANLIB = " << var("QMAKE_RANLIB") << Qt::endl;
|
||||
t << "SED = " << var("QMAKE_STREAM_EDITOR") << Qt::endl;
|
||||
t << "STRIP = " << var("QMAKE_STRIP") << Qt::endl;
|
||||
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
t << "####### Output directory\n\n";
|
||||
// This is used in commands by some .prf files.
|
||||
if (! project->values("OBJECTS_DIR").isEmpty())
|
||||
t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << endl;
|
||||
t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << Qt::endl;
|
||||
else
|
||||
t << "OBJECTS_DIR = ./\n";
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
/* files */
|
||||
t << "####### Files\n\n";
|
||||
// This is used by the dist target.
|
||||
t << "SOURCES = " << fileVarList("SOURCES") << ' ' << fileVarList("GENERATED_SOURCES") << endl;
|
||||
t << "SOURCES = " << fileVarList("SOURCES") << ' ' << fileVarList("GENERATED_SOURCES") << Qt::endl;
|
||||
if(do_incremental) {
|
||||
const ProStringList &objs = project->values("OBJECTS");
|
||||
const ProStringList &incrs = project->values("QMAKE_INCREMENTAL");
|
||||
@ -259,59 +259,59 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\\\n\t\t" << (*objit);
|
||||
}
|
||||
if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done!
|
||||
t << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << endl;
|
||||
t << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << Qt::endl;
|
||||
} else if(!incrs_out.count()) {
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
} else {
|
||||
src_incremental = true;
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
t << "INCREMENTAL_OBJECTS = "
|
||||
<< escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << endl;
|
||||
<< escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << Qt::endl;
|
||||
}
|
||||
} else {
|
||||
// Used all over the place in both deps and commands.
|
||||
t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << endl;
|
||||
t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << Qt::endl;
|
||||
}
|
||||
if(do_incremental && !src_incremental)
|
||||
do_incremental = false;
|
||||
t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " "
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl;
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << Qt::endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << Qt::endl;
|
||||
QString destd = fileVar("DESTDIR");
|
||||
// When building on non-MSys MinGW, the path ends with a backslash, which
|
||||
// GNU make will interpret that as a line continuation. Doubling the backslash
|
||||
// avoids the problem, at the cost of the variable containing *both* backslashes.
|
||||
if (destd.endsWith('\\'))
|
||||
destd += '\\';
|
||||
t << "DESTDIR = " << destd << endl;
|
||||
t << "TARGET = " << fileVar("TARGET") << endl;
|
||||
t << "DESTDIR = " << destd << Qt::endl;
|
||||
t << "TARGET = " << fileVar("TARGET") << Qt::endl;
|
||||
if(project->isActiveConfig("plugin")) {
|
||||
t << "TARGETD = " << fileVar("TARGET") << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET") << Qt::endl;
|
||||
} else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||
t << "TARGETA = " << fileVar("TARGETA") << endl;
|
||||
t << "TARGETA = " << fileVar("TARGETA") << Qt::endl;
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
t << "TARGETD = " << fileVar("TARGET_x.y") << endl;
|
||||
t << "TARGET0 = " << fileVar("TARGET_") << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET_x.y") << Qt::endl;
|
||||
t << "TARGET0 = " << fileVar("TARGET_") << Qt::endl;
|
||||
} else if (!project->isActiveConfig("unversioned_libname")) {
|
||||
t << "TARGET0 = " << fileVar("TARGET_") << endl;
|
||||
t << "TARGET0 = " << fileVar("TARGET_") << Qt::endl;
|
||||
if (project->isEmpty("QMAKE_HPUX_SHLIB")) {
|
||||
t << "TARGETD = " << fileVar("TARGET_x.y.z") << endl;
|
||||
t << "TARGET1 = " << fileVar("TARGET_x") << endl;
|
||||
t << "TARGET2 = " << fileVar("TARGET_x.y") << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET_x.y.z") << Qt::endl;
|
||||
t << "TARGET1 = " << fileVar("TARGET_x") << Qt::endl;
|
||||
t << "TARGET2 = " << fileVar("TARGET_x.y") << Qt::endl;
|
||||
} else {
|
||||
t << "TARGETD = " << fileVar("TARGET_x") << endl;
|
||||
t << "TARGETD = " << fileVar("TARGET_x") << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
writeExtraCompilerVariables(t);
|
||||
writeExtraVariables(t);
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
// blasted includes
|
||||
const ProStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
ProStringList::ConstIterator it;
|
||||
for(it = qeui.begin(); it != qeui.end(); ++it)
|
||||
t << "include " << escapeDependencyPath(*it) << endl;
|
||||
t << "include " << escapeDependencyPath(*it) << Qt::endl;
|
||||
|
||||
/* rules */
|
||||
t << "first:" << (!project->isActiveConfig("no_default_goal_deps") ? " all" : "") << "\n";
|
||||
@ -321,7 +321,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
ProStringList objects = project->values("OBJECTS");
|
||||
for (ProStringList::Iterator it = objects.begin(); it != objects.end(); ++it) {
|
||||
QString d_file = (*it).toQString().replace(QRegExp(Option::obj_ext + "$"), ".d");
|
||||
t << "-include " << escapeDependencyPath(d_file) << endl;
|
||||
t << "-include " << escapeDependencyPath(d_file) << Qt::endl;
|
||||
project->values("QMAKE_DISTCLEAN") << d_file;
|
||||
}
|
||||
} else {
|
||||
@ -379,8 +379,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QStringList deps = findDependencies((*it).toQString()).filter(QRegExp(
|
||||
"((^|/)" + Option::h_moc_mod + "|" + Option::cpp_moc_ext + "$)"));
|
||||
if(!deps.isEmpty())
|
||||
t << d_file_d << ": " << finalizeDependencyPaths(deps).join(' ') << endl;
|
||||
t << "-include " << d_file_d << endl;
|
||||
t << d_file_d << ": " << finalizeDependencyPaths(deps).join(' ') << Qt::endl;
|
||||
t << "-include " << d_file_d << Qt::endl;
|
||||
project->values("QMAKE_DISTCLEAN") += d_file;
|
||||
}
|
||||
}
|
||||
@ -399,7 +399,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
|
||||
t << escapeFilePath(libdir + project->first("QMAKE_PREFIX_STATICLIB") + (*it) + '.'
|
||||
+ project->first("QMAKE_EXTENSION_STATICLIB")) << ' ';
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
QString target_deps;
|
||||
if ((project->isActiveConfig("depend_prl") || project->isActiveConfig("fast_depend_prl"))
|
||||
@ -504,7 +504,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "$(LINK) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
} else {
|
||||
t << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) "
|
||||
<< target_deps << ' ' << depVar("POST_TARGETDEPS") << "\n\t";
|
||||
@ -517,7 +517,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if (!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
}
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
allDeps = ' ' + depVar("TARGET");
|
||||
} else if(!project->isActiveConfig("staticlib")) {
|
||||
@ -548,7 +548,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
//actual target
|
||||
const QString link_deps = "$(OBJECTS) ";
|
||||
t << incr_target_dir_d << ": " << link_deps << "\n\t"
|
||||
<< "ld -r -o " << incr_target_dir_f << ' ' << link_deps << endl;
|
||||
<< "ld -r -o " << incr_target_dir_f << ' ' << link_deps << Qt::endl;
|
||||
//communicated below
|
||||
ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
|
||||
cmd[0] = cmd.at(0).toQString().replace(QLatin1String("$(OBJECTS) "), QLatin1String("$(INCREMENTAL_OBJECTS)")); //ick
|
||||
@ -606,7 +606,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "-$(MOVE) $(TARGET) " << destdir << "$(TARGET)";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
} else if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
bundledFiles << destdir_r + var("TARGET");
|
||||
t << "\n\t"
|
||||
@ -620,7 +620,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
" Versions/Current/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
} else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
|
||||
t << "\n\t";
|
||||
|
||||
@ -654,7 +654,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
} else {
|
||||
t << "\n\t"
|
||||
<< "-$(DEL_FILE) $(TARGET) $(TARGET0)\n\t"
|
||||
@ -668,9 +668,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "-$(MOVE) $(TARGET0) " << destdir << "$(TARGET0)\n\t";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
if (! project->isActiveConfig("plugin")) {
|
||||
t << "staticlib: " << depVar("TARGETA") << "\n\n";
|
||||
@ -688,7 +688,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
if(!project->isEmpty("QMAKE_RANLIB"))
|
||||
t << "\n\t$(RANLIB) $(TARGETA)";
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
} else {
|
||||
QString destdir_r = project->first("DESTDIR").toQString();
|
||||
@ -708,7 +708,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t" << var("QMAKE_POST_LINK") << "\n";
|
||||
if (!project->isEmpty("QMAKE_RANLIB"))
|
||||
t << "\t$(RANLIB) " << destdir << "$(TARGET)\n";
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
writeMakeQmake(t);
|
||||
@ -722,7 +722,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
if(!meta_files.isEmpty())
|
||||
t << escapeDependencyPaths(meta_files).join(" ") << ": \n\t"
|
||||
<< "@$(QMAKE) -prl " << escapeFilePath(project->projectFile()) << ' ' << buildArgs(true) << endl;
|
||||
<< "@$(QMAKE) -prl " << escapeFilePath(project->projectFile()) << ' ' << buildArgs(true) << Qt::endl;
|
||||
}
|
||||
|
||||
if (!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
@ -743,7 +743,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "@echo \"APPL"
|
||||
<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO")
|
||||
? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4))
|
||||
<< "\" > " << pkginfo_f << endl;
|
||||
<< "\" > " << pkginfo_f << Qt::endl;
|
||||
}
|
||||
if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) {
|
||||
ProString resources = project->first("QMAKE_BUNDLE_RESOURCE_FILE");
|
||||
@ -852,7 +852,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "-e \"s,\\$${EXECUTABLE_NAME}," << (app_bundle_name.isEmpty() ? app_bundle_name : plugin_bundle_name) << ",g\" "
|
||||
<< "-e \"s,@TYPEINFO@,"<< typeInfo << ",g\" "
|
||||
<< "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO},"<< typeInfo << ",g\" "
|
||||
<< "" << info_plist << " >" << info_plist_out << endl;
|
||||
<< "" << info_plist << " >" << info_plist_out << Qt::endl;
|
||||
//copy the icon
|
||||
if (!project->isEmpty("ICON")) {
|
||||
QString dir = bundle_dir + "Contents/Resources/";
|
||||
@ -863,7 +863,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << escapeDependencyPath(icon_path) << ": " << escapeDependencyPath(icon) << "\n\t"
|
||||
<< mkdir_p_asstring(dir) << "\n\t"
|
||||
<< "@$(DEL_FILE) " << icon_path_f << "\n\t"
|
||||
<< "@$(COPY_FILE) " << escapeFilePath(icon) << ' ' << icon_path_f << endl;
|
||||
<< "@$(COPY_FILE) " << escapeFilePath(icon) << ' ' << icon_path_f << Qt::endl;
|
||||
}
|
||||
} else {
|
||||
ProString lib_bundle_name = var("QMAKE_FRAMEWORK_BUNDLE_NAME");
|
||||
@ -880,7 +880,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "-e \"s,\\$${EXECUTABLE_NAME}," << lib_bundle_name << ",g\" "
|
||||
<< "-e \"s,@TYPEINFO@," << typeInfo << ",g\" "
|
||||
<< "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO}," << typeInfo << ",g\" "
|
||||
<< "" << info_plist << " >" << info_plist_out << endl;
|
||||
<< "" << info_plist << " >" << info_plist_out << Qt::endl;
|
||||
}
|
||||
break;
|
||||
} // project->isActiveConfig("no_plist")
|
||||
@ -924,10 +924,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QFileInfo fi(fileInfo(fn));
|
||||
if(fi.isDir())
|
||||
t << "@$(DEL_FILE) -r " << dst << "\n\t"
|
||||
<< "@$(COPY_DIR) " << src << " " << dst << endl;
|
||||
<< "@$(COPY_DIR) " << src << " " << dst << Qt::endl;
|
||||
else
|
||||
t << "@$(DEL_FILE) " << dst << "\n\t"
|
||||
<< "@$(COPY_FILE) " << src << " " << dst << endl;
|
||||
<< "@$(COPY_FILE) " << src << " " << dst << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -940,7 +940,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
alldeps << symIt.key();
|
||||
t << escapeDependencyPath(symIt.key()) << ":\n\t"
|
||||
<< mkdir_p_asstring(bundle_dir) << "\n\t"
|
||||
<< "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl;
|
||||
<< "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << Qt::endl;
|
||||
}
|
||||
|
||||
if (!project->isActiveConfig("shallow_bundle")) {
|
||||
@ -952,24 +952,24 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< mkdir_p_asstring(bundle_dir + "Versions") << "\n\t"
|
||||
<< "@-$(DEL_FILE) " << currentLink_f << "\n\t"
|
||||
<< "@$(SYMLINK) " << project->first("QMAKE_FRAMEWORK_VERSION")
|
||||
<< ' ' << currentLink_f << endl;
|
||||
<< ' ' << currentLink_f << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t << endl << "all: " << deps
|
||||
t << Qt::endl << "all: " << deps
|
||||
<< valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " \\\n\t\t", " \\\n\t\t", "")
|
||||
<< allDeps << endl << endl;
|
||||
<< allDeps << Qt::endl << Qt::endl;
|
||||
|
||||
t << "dist: distdir FORCE\n\t";
|
||||
t << "(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar)"
|
||||
" && $(MOVE) `dirname $(DISTDIR)`" << Option::dir_sep << "$(DISTNAME).tar.gz ."
|
||||
" && $(DEL_FILE) -r $(DISTDIR)";
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
t << "distdir: FORCE\n\t"
|
||||
<< mkdir_p_asstring("$(DISTDIR)", false) << "\n\t"
|
||||
<< "$(COPY_FILE) --parents $(DIST) $(DISTDIR)" << Option::dir_sep << endl;
|
||||
<< "$(COPY_FILE) --parents $(DIST) $(DISTDIR)" << Option::dir_sep << Qt::endl;
|
||||
if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
|
||||
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
|
||||
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
|
||||
@ -979,20 +979,20 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if(val.isEmpty())
|
||||
continue;
|
||||
t << "\t$(COPY_FILE) --parents " << escapeFilePaths(val).join(' ')
|
||||
<< " $(DISTDIR)" << Option::dir_sep << endl;
|
||||
<< " $(DISTDIR)" << Option::dir_sep << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!project->isEmpty("TRANSLATIONS"))
|
||||
t << "\t$(COPY_FILE) --parents " << fileVar("TRANSLATIONS") << " $(DISTDIR)" << Option::dir_sep << endl;
|
||||
t << endl << endl;
|
||||
t << "\t$(COPY_FILE) --parents " << fileVar("TRANSLATIONS") << " $(DISTDIR)" << Option::dir_sep << Qt::endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
QString clean_targets = " compiler_clean " + depVar("CLEAN_DEPS");
|
||||
if(do_incremental) {
|
||||
t << "incrclean:\n";
|
||||
if(src_incremental)
|
||||
t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n";
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
t << "clean:" << clean_targets << "\n\t";
|
||||
@ -1060,7 +1060,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n\t";
|
||||
t << fileVarGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t")
|
||||
<< "-$(DEL_FILE) *~ core *.core\n"
|
||||
<< fileVarGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl;
|
||||
<< fileVarGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << Qt::endl << Qt::endl;
|
||||
|
||||
ProString destdir = project->first("DESTDIR");
|
||||
if (!destdir.isEmpty() && !destdir.endsWith(Option::dir_sep))
|
||||
@ -1068,7 +1068,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "distclean: clean " << depVar("DISTCLEAN_DEPS") << '\n';
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE"));
|
||||
t << "\t-$(DEL_FILE) -r " << bundlePath << endl;
|
||||
t << "\t-$(DEL_FILE) -r " << bundlePath << Qt::endl;
|
||||
} else if (project->isActiveConfig("staticlib") || project->isActiveConfig("plugin")) {
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(destdir) << "$(TARGET) \n";
|
||||
} else if (project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||
@ -1087,9 +1087,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
{
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl;
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << Qt::endl;
|
||||
}
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
t << "####### Sub-libraries\n\n";
|
||||
if (!project->values("SUBLIBS").isEmpty()) {
|
||||
@ -1100,7 +1100,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
for (it = l.begin(); it != l.end(); ++it)
|
||||
t << escapeDependencyPath(libdir + project->first("QMAKE_PREFIX_STATICLIB") + (*it) + '.'
|
||||
+ project->first("QMAKE_EXTENSION_STATICLIB")) << ":\n\t"
|
||||
<< var(ProKey("MAKELIB" + *it)) << endl << endl;
|
||||
<< var(ProKey("MAKELIB" + *it)) << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
|
||||
@ -1184,7 +1184,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
compilerExecutable = "$(CXX)";
|
||||
|
||||
// compile command
|
||||
t << "\n\t" << compilerExecutable << cflags << " $(INCPATH) " << pchArchFlags << endl << endl;
|
||||
t << "\n\t" << compilerExecutable << cflags << " $(INCPATH) " << pchArchFlags << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
writePkgConfigFile();
|
||||
|
||||
if(Option::mkfile::do_stub_makefile) {
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl;
|
||||
const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << escapeDependencyPath(*it) << ' ';
|
||||
@ -148,7 +148,7 @@ void createLdResponseFile(const QString &fileName, const ProStringList &objList)
|
||||
.replace(QLatin1Char('\t'), QLatin1String("\\\t"))
|
||||
.replace(QLatin1Char('"'), QLatin1String("\\\""))
|
||||
.replace(QLatin1Char('\''), QLatin1String("\\'"));
|
||||
t << path << endl;
|
||||
t << path << Qt::endl;
|
||||
}
|
||||
t.flush();
|
||||
file.close();
|
||||
@ -162,9 +162,9 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co
|
||||
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
QTextStream t(&file);
|
||||
// ### quoting?
|
||||
t << "CREATE " << target << endl;
|
||||
t << "CREATE " << target << Qt::endl;
|
||||
for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
|
||||
t << "ADDMOD " << *it << endl;
|
||||
t << "ADDMOD " << *it << Qt::endl;
|
||||
}
|
||||
t << "SAVE\n";
|
||||
t.flush();
|
||||
@ -183,13 +183,13 @@ void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
|
||||
<< finalizeDependencyPaths(findDependencies(header)).join(" \\\n\t\t")
|
||||
<< "\n\t" << mkdir_p_asstring(preCompHeaderOut)
|
||||
<< "\n\t$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << escapeFilePath(cHeader)
|
||||
<< ' ' << escapeFilePath(header) << endl << endl;
|
||||
<< ' ' << escapeFilePath(header) << Qt::endl << Qt::endl;
|
||||
QString cppHeader = preCompHeaderOut + Option::dir_sep + "c++";
|
||||
t << escapeDependencyPath(cppHeader) << ": " << escapeDependencyPath(header) << " "
|
||||
<< finalizeDependencyPaths(findDependencies(header)).join(" \\\n\t\t")
|
||||
<< "\n\t" << mkdir_p_asstring(preCompHeaderOut)
|
||||
<< "\n\t$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << escapeFilePath(cppHeader)
|
||||
<< ' ' << escapeFilePath(header) << endl << endl;
|
||||
<< ' ' << escapeFilePath(header) << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,21 +274,21 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t)
|
||||
t << "-I";
|
||||
t << escapeFilePath(inc) << ' ';
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
|
||||
{
|
||||
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
|
||||
t << "LIB = " << var("QMAKE_LIB") << endl;
|
||||
t << "LIB = " << var("QMAKE_LIB") << Qt::endl;
|
||||
} else {
|
||||
t << "LINKER = " << var("QMAKE_LINK") << endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
|
||||
t << "LINKER = " << var("QMAKE_LINK") << Qt::endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << Qt::endl;
|
||||
t << "LIBS = "
|
||||
<< fixLibFlags("LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("LIBS_PRIVATE").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl;
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
}
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" <<var("QMAKE_POST_LINK");
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
|
||||
|
@ -143,7 +143,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
|
||||
t << escapeDependencyPath(precompObj) << ": " << escapeDependencyPath(precompH) << ' '
|
||||
<< finalizeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t")
|
||||
<< "\n\t$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP "
|
||||
<< escapeFilePath(precompH) << endl << endl;
|
||||
<< escapeFilePath(precompH) << Qt::endl << Qt::endl;
|
||||
}
|
||||
if (usePCHC) {
|
||||
QString precompRuleC = QString("-c -Yc -Fp%1 -Fo%2")
|
||||
@ -151,7 +151,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
|
||||
t << escapeDependencyPath(precompObjC) << ": " << escapeDependencyPath(precompH) << ' '
|
||||
<< finalizeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t")
|
||||
<< "\n\t$(CC) " + precompRuleC +" $(CFLAGS) $(INCPATH) -TC "
|
||||
<< escapeFilePath(precompH) << endl << endl;
|
||||
<< escapeFilePath(precompH) << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
|
||||
t << " " << (*cit);
|
||||
for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
|
||||
t << " " << (*cppit);
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
bool useInferenceRules = !project->isActiveConfig("no_batch");
|
||||
QSet<QString> source_directories;
|
||||
@ -393,9 +393,9 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
|
||||
}
|
||||
} else {
|
||||
for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
|
||||
t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl;
|
||||
t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << Qt::endl << Qt::endl;
|
||||
for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
|
||||
t << (*cit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
|
||||
t << (*cit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
}
|
||||
@ -498,7 +498,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
if(!project->isEmpty("QMAKE_POST_LINK")) {
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
void NmakeMakefileGenerator::writeLinkCommand(QTextStream &t, const QString &extraFlags, const QString &extraInlineFileContent)
|
||||
|
@ -923,7 +923,7 @@ struct VCFilterFile
|
||||
inline QDebug operator<<(QDebug dbg, const VCFilterFile &p)
|
||||
{
|
||||
dbg.nospace() << "VCFilterFile(file(" << p.file
|
||||
<< ") excludeFromBuild(" << p.excludeFromBuild << "))" << endl;
|
||||
<< ") excludeFromBuild(" << p.excludeFromBuild << "))" << Qt::endl;
|
||||
return dbg.space();
|
||||
}
|
||||
#endif
|
||||
|
@ -320,11 +320,11 @@ void Win32MakefileGenerator::processRcFileVar()
|
||||
int rcCodePage = project->intValue("RC_CODEPAGE", 1200); // default: Unicode
|
||||
|
||||
ts << "#include <windows.h>\n";
|
||||
ts << endl;
|
||||
ts << Qt::endl;
|
||||
if (!rcIcons.isEmpty()) {
|
||||
for (int i = 0; i < rcIcons.size(); ++i)
|
||||
ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << endl;
|
||||
ts << endl;
|
||||
ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << Qt::endl;
|
||||
ts << Qt::endl;
|
||||
}
|
||||
if (!manifestFile.isEmpty()) {
|
||||
QString manifestResourceId;
|
||||
@ -335,8 +335,8 @@ void Win32MakefileGenerator::processRcFileVar()
|
||||
ts << manifestResourceId << " RT_MANIFEST \"" << manifestFile << "\"\n";
|
||||
}
|
||||
ts << "VS_VERSION_INFO VERSIONINFO\n";
|
||||
ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << endl;
|
||||
ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << endl;
|
||||
ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << Qt::endl;
|
||||
ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << Qt::endl;
|
||||
ts << "\tFILEFLAGSMASK 0x3fL\n";
|
||||
ts << "#ifdef _DEBUG\n";
|
||||
ts << "\tFILEFLAGS VS_FF_DEBUG\n";
|
||||
@ -369,11 +369,11 @@ void Win32MakefileGenerator::processRcFileVar()
|
||||
ts << "\t\tBEGIN\n";
|
||||
ts << "\t\t\tVALUE \"Translation\", "
|
||||
<< QString("0x%1").arg(rcLang, 4, 16, QLatin1Char('0'))
|
||||
<< ", " << QString("%1").arg(rcCodePage, 4) << endl;
|
||||
<< ", " << QString("%1").arg(rcCodePage, 4) << Qt::endl;
|
||||
ts << "\t\tEND\n";
|
||||
ts << "\tEND\n";
|
||||
ts << "/* End of Version info */\n";
|
||||
ts << endl;
|
||||
ts << Qt::endl;
|
||||
|
||||
ts.flush();
|
||||
|
||||
@ -470,7 +470,7 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t)
|
||||
}
|
||||
}
|
||||
}
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
t << "distclean: clean " << depVar("DISTCLEAN_DEPS");
|
||||
{
|
||||
@ -503,9 +503,9 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t)
|
||||
{
|
||||
QString ofile = fileFixify(Option::output.fileName());
|
||||
if(!ofile.isEmpty())
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl;
|
||||
t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << Qt::endl;
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
void Win32MakefileGenerator::writeIncPart(QTextStream &t)
|
||||
@ -519,7 +519,7 @@ void Win32MakefileGenerator::writeIncPart(QTextStream &t)
|
||||
if(!inc.isEmpty())
|
||||
t << "-I" << escapeFilePath(inc) << ' ';
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
}
|
||||
|
||||
void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
@ -527,51 +527,51 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
writeExportedVariables(t);
|
||||
|
||||
t << "####### Compiler, tools and options\n\n";
|
||||
t << "CC = " << var("QMAKE_CC") << endl;
|
||||
t << "CXX = " << var("QMAKE_CXX") << endl;
|
||||
t << "CC = " << var("QMAKE_CC") << Qt::endl;
|
||||
t << "CXX = " << var("QMAKE_CXX") << Qt::endl;
|
||||
t << "DEFINES = "
|
||||
<< varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
|
||||
<< varGlue("DEFINES","-D"," -D","") << endl;
|
||||
<< varGlue("DEFINES","-D"," -D","") << Qt::endl;
|
||||
t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n";
|
||||
t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n";
|
||||
|
||||
writeIncPart(t);
|
||||
writeLibsPart(t);
|
||||
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl;
|
||||
t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") : var("QMAKE_IDC"))
|
||||
<< endl;
|
||||
<< Qt::endl;
|
||||
t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? QString("midl") : var("QMAKE_IDL"))
|
||||
<< endl;
|
||||
t << "ZIP = " << var("QMAKE_ZIP") << endl;
|
||||
t << "DEF_FILE = " << fileVar("DEF_FILE") << endl;
|
||||
t << "RES_FILE = " << fileVar("RES_FILE") << endl; // Not on mingw, can't see why not though...
|
||||
t << "COPY = " << var("QMAKE_COPY") << endl;
|
||||
t << "SED = " << var("QMAKE_STREAM_EDITOR") << endl;
|
||||
t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl;
|
||||
t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl;
|
||||
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
|
||||
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
|
||||
t << "MOVE = " << var("QMAKE_MOVE") << endl;
|
||||
t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
|
||||
t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
|
||||
t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl;
|
||||
t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl;
|
||||
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
|
||||
t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << endl;
|
||||
t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << endl;
|
||||
t << endl;
|
||||
<< Qt::endl;
|
||||
t << "ZIP = " << var("QMAKE_ZIP") << Qt::endl;
|
||||
t << "DEF_FILE = " << fileVar("DEF_FILE") << Qt::endl;
|
||||
t << "RES_FILE = " << fileVar("RES_FILE") << Qt::endl; // Not on mingw, can't see why not though...
|
||||
t << "COPY = " << var("QMAKE_COPY") << Qt::endl;
|
||||
t << "SED = " << var("QMAKE_STREAM_EDITOR") << Qt::endl;
|
||||
t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << Qt::endl;
|
||||
t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << Qt::endl;
|
||||
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl;
|
||||
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << Qt::endl;
|
||||
t << "MOVE = " << var("QMAKE_MOVE") << Qt::endl;
|
||||
t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << Qt::endl;
|
||||
t << "MKDIR = " << var("QMAKE_MKDIR") << Qt::endl;
|
||||
t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << Qt::endl;
|
||||
t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << Qt::endl;
|
||||
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << Qt::endl;
|
||||
t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << Qt::endl;
|
||||
t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << Qt::endl;
|
||||
t << Qt::endl;
|
||||
|
||||
t << "####### Output directory\n\n";
|
||||
if(!project->values("OBJECTS_DIR").isEmpty())
|
||||
t << "OBJECTS_DIR = " << escapeFilePath(var("OBJECTS_DIR").remove(QRegExp("\\\\$"))) << endl;
|
||||
t << "OBJECTS_DIR = " << escapeFilePath(var("OBJECTS_DIR").remove(QRegExp("\\\\$"))) << Qt::endl;
|
||||
else
|
||||
t << "OBJECTS_DIR = . \n";
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
t << "####### Files\n\n";
|
||||
t << "SOURCES = " << valList(escapeFilePaths(project->values("SOURCES")))
|
||||
<< " " << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl;
|
||||
<< " " << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << Qt::endl;
|
||||
|
||||
// do this here so we can set DEST_TARGET to be the complete path to the final target if it is needed.
|
||||
QString orgDestDir = var("DESTDIR");
|
||||
@ -587,14 +587,14 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
writeExtraVariables(t);
|
||||
|
||||
t << "DIST = " << fileVarList("DISTFILES") << ' '
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; // unused
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << Qt::endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << Qt::endl; // unused
|
||||
// The comment is important to maintain variable compatibility with Unix
|
||||
// Makefiles, while not interpreting a trailing-slash as a linebreak
|
||||
t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak\n";
|
||||
t << "TARGET = " << escapeFilePath(target) << endl;
|
||||
t << "DESTDIR_TARGET = " << fileVar("DEST_TARGET") << endl;
|
||||
t << endl;
|
||||
t << "TARGET = " << escapeFilePath(target) << Qt::endl;
|
||||
t << "DESTDIR_TARGET = " << fileVar("DEST_TARGET") << Qt::endl;
|
||||
t << Qt::endl;
|
||||
|
||||
writeImplicitRulesPart(t);
|
||||
|
||||
@ -606,10 +606,10 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
const ProStringList &dlldirs = project->values("DLLDESTDIR");
|
||||
for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
|
||||
t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) "
|
||||
<< escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl;
|
||||
<< escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << Qt::endl;
|
||||
}
|
||||
}
|
||||
t << endl;
|
||||
t << Qt::endl;
|
||||
|
||||
writeRcFilePart(t);
|
||||
}
|
||||
@ -642,33 +642,33 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
}
|
||||
}
|
||||
}
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
|
||||
writeCleanParts(t);
|
||||
writeExtraTargets(t);
|
||||
writeExtraCompilerTargets(t);
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
void Win32MakefileGenerator::writeLibsPart(QTextStream &t)
|
||||
{
|
||||
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
|
||||
t << "LIBAPP = " << var("QMAKE_LIB") << endl;
|
||||
t << "LIBFLAGS = " << var("QMAKE_LIBFLAGS") << endl;
|
||||
t << "LIBAPP = " << var("QMAKE_LIB") << Qt::endl;
|
||||
t << "LIBFLAGS = " << var("QMAKE_LIBFLAGS") << Qt::endl;
|
||||
} else {
|
||||
t << "LINKER = " << var("QMAKE_LINK") << endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
|
||||
t << "LINKER = " << var("QMAKE_LINK") << Qt::endl;
|
||||
t << "LFLAGS = " << var("QMAKE_LFLAGS") << Qt::endl;
|
||||
t << "LIBS = " << fixLibFlags("LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("LIBS_PRIVATE").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS").join(' ') << ' '
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl;
|
||||
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void Win32MakefileGenerator::writeObjectsPart(QTextStream &t)
|
||||
{
|
||||
// Used in both deps and commands.
|
||||
t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << endl;
|
||||
t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << Qt::endl;
|
||||
}
|
||||
|
||||
void Win32MakefileGenerator::writeImplicitRulesPart(QTextStream &t)
|
||||
@ -710,7 +710,7 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t)
|
||||
<< var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "")
|
||||
<< defines << incPathStr << " -fo " << escapeFilePath(res_file)
|
||||
<< ' ' << escapeFilePath(rc_file);
|
||||
t << endl << endl;
|
||||
t << Qt::endl << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ void XmlOutput::newTagOpen(const QString &tag)
|
||||
closeOpen();
|
||||
|
||||
if (format == NewLine)
|
||||
xmlFile << endl << currentIndent;
|
||||
xmlFile << Qt::endl << currentIndent;
|
||||
xmlFile << '<' << doConversion(tag);
|
||||
currentState = Attribute;
|
||||
tagStack.append(tag);
|
||||
@ -271,7 +271,7 @@ void XmlOutput::closeTag()
|
||||
case Tag:
|
||||
decreaseIndent(); // <--- Pre-decrease indent
|
||||
if (format == NewLine)
|
||||
xmlFile << endl << currentIndent;
|
||||
xmlFile << Qt::endl << currentIndent;
|
||||
xmlFile << "</" << doConversion(tagStack.last()) << '>';
|
||||
tagStack.pop_back();
|
||||
break;
|
||||
@ -343,7 +343,7 @@ void XmlOutput::addAttribute(const QString &attribute, const QString &value)
|
||||
break;
|
||||
}
|
||||
if (format == NewLine)
|
||||
xmlFile << endl;
|
||||
xmlFile << Qt::endl;
|
||||
xmlFile << currentIndent << doConversion(attribute) << "=\"" << doConversion(value) << "\"";
|
||||
}
|
||||
|
||||
|
2
src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
vendored
2
src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
vendored
@ -1471,7 +1471,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
|
||||
while (finalOrder[toMove].form && fixed < len-1) {
|
||||
IDEBUG(" fixed = %d, toMove=%d, moving form %d with pos %d", fixed, toMove, finalOrder[toMove].form, finalOrder[toMove].position);
|
||||
for (i = fixed; i < len; i++) {
|
||||
// IDEBUG() << " i=" << i << "uc=" << hex << uc[i] << "form=" << form(uc[i])
|
||||
// IDEBUG() << " i=" << i << "uc=" << Qt::hex << uc[i] << "form=" << form(uc[i])
|
||||
// << "position=" << position[i];
|
||||
if (form(uc[i]) == finalOrder[toMove].form &&
|
||||
position[i] == finalOrder[toMove].position) {
|
||||
|
4
src/3rdparty/harfbuzz/tests/shaping/main.cpp
vendored
4
src/3rdparty/harfbuzz/tests/shaping/main.cpp
vendored
@ -370,7 +370,7 @@ void tst_QScriptEngine::greek()
|
||||
QString str;
|
||||
str.append(uc);
|
||||
if (str.normalized(QString::NormalizationForm_D).normalized(QString::NormalizationForm_C) != str) {
|
||||
//qDebug() << "skipping" << hex << uc;
|
||||
//qDebug() << "skipping" << Qt::hex << uc;
|
||||
continue;
|
||||
}
|
||||
if (uc == 0x1fc1 || uc == 0x1fed)
|
||||
@ -389,7 +389,7 @@ void tst_QScriptEngine::greek()
|
||||
QString str;
|
||||
str.append(uc);
|
||||
if (str.normalized(QString::NormalizationForm_D).normalized(QString::NormalizationForm_C) != str) {
|
||||
//qDebug() << "skipping" << hex << uc;
|
||||
//qDebug() << "skipping" << Qt::hex << uc;
|
||||
continue;
|
||||
}
|
||||
if (uc == 0x1fc1 || uc == 0x1fed)
|
||||
|
@ -133,7 +133,7 @@ QSet<QString> set;
|
||||
...
|
||||
QSet<QString>::iterator it = qFind(set.begin(), set.end(), "Jeanette");
|
||||
if (it != set.end())
|
||||
cout << "Found Jeanette" << endl;
|
||||
cout << "Found Jeanette" << Qt::endl;
|
||||
//! [10]
|
||||
|
||||
|
||||
@ -152,7 +152,7 @@ QSet<QString> set;
|
||||
...
|
||||
QSet<QString>::iterator it = qFind(set.begin(), set.end(), "Jeanette");
|
||||
if (it != set.constEnd())
|
||||
cout << "Found Jeanette" << endl;
|
||||
cout << "Found Jeanette" << Qt::endl;
|
||||
//! [12]
|
||||
|
||||
|
||||
|
@ -124,12 +124,12 @@ in >> ch1 >> ch2 >> ch3;
|
||||
|
||||
//! [8]
|
||||
QTextStream out(stdout);
|
||||
out << "Qt rocks!" << endl;
|
||||
out << "Qt rocks!" << Qt::endl;
|
||||
//! [8]
|
||||
|
||||
|
||||
//! [9]
|
||||
stream << '\n' << flush;
|
||||
stream << '\n' << Qt::flush;
|
||||
//! [9]
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ QFuture<QString> future = ...;
|
||||
|
||||
QFuture<QString>::const_iterator i;
|
||||
for (i = future.constBegin(); i != future.constEnd(); ++i)
|
||||
cout << *i << endl;
|
||||
cout << *i << Qt::endl;
|
||||
//! [0]
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ ba[4] = 0xca;
|
||||
//! [2]
|
||||
for (int i = 0; i < ba.size(); ++i) {
|
||||
if (ba.at(i) >= 'a' && ba.at(i) <= 'f')
|
||||
cout << "Found character in range [a-f]" << endl;
|
||||
cout << "Found character in range [a-f]" << Qt::endl;
|
||||
}
|
||||
//! [2]
|
||||
|
||||
@ -88,7 +88,7 @@ x.replace(5, 3, "&"); // x == "rock & roll"
|
||||
QByteArray ba("We must be <b>bold</b>, very <b>bold</b>");
|
||||
int j = 0;
|
||||
while ((j = ba.indexOf("<b>", j)) != -1) {
|
||||
cout << "Found <b> tag at index position " << j << endl;
|
||||
cout << "Found <b> tag at index position " << j << Qt::endl;
|
||||
++j;
|
||||
}
|
||||
//! [4]
|
||||
@ -126,7 +126,7 @@ QByteArray("abc").isEmpty(); // returns false
|
||||
QByteArray ba("Hello world");
|
||||
char *data = ba.data();
|
||||
while (*data) {
|
||||
cout << "[" << *data << "]" << endl;
|
||||
cout << "[" << *data << "]" << Qt::endl;
|
||||
++data;
|
||||
}
|
||||
//! [8]
|
||||
|
@ -89,7 +89,7 @@ QHash<int, QWidget *> hash;
|
||||
...
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
if (hash[i] == okButton)
|
||||
cout << "Found button at index " << i << endl;
|
||||
cout << "Found button at index " << i << Qt::endl;
|
||||
}
|
||||
//! [6]
|
||||
|
||||
@ -98,7 +98,7 @@ for (int i = 0; i < 1000; ++i) {
|
||||
QHashIterator<QString, int> i(hash);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
}
|
||||
//! [7]
|
||||
|
||||
@ -106,7 +106,7 @@ while (i.hasNext()) {
|
||||
//! [8]
|
||||
QHash<QString, int>::const_iterator i = hash.constBegin();
|
||||
while (i != hash.constEnd()) {
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [8]
|
||||
@ -122,14 +122,14 @@ hash.insert("plenty", 2000);
|
||||
//! [10]
|
||||
QList<int> values = hash.values("plenty");
|
||||
for (int i = 0; i < values.size(); ++i)
|
||||
cout << values.at(i) << endl;
|
||||
cout << values.at(i) << Qt::endl;
|
||||
//! [10]
|
||||
|
||||
|
||||
//! [11]
|
||||
QHash<QString, int>::iterator i = hash.find("plenty");
|
||||
while (i != hash.end() && i.key() == "plenty") {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [11]
|
||||
@ -139,7 +139,7 @@ while (i != hash.end() && i.key() == "plenty") {
|
||||
QHash<QString, int> hash;
|
||||
...
|
||||
foreach (int value, hash)
|
||||
cout << value << endl;
|
||||
cout << value << Qt::endl;
|
||||
//! [12]
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ QHash<QString, int> hash;
|
||||
...
|
||||
QHash<QString, int>::const_iterator i = hash.find("HDR");
|
||||
while (i != hash.end() && i.key() == "HDR") {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [16]
|
||||
@ -216,7 +216,7 @@ hash.insert("December", 12);
|
||||
|
||||
QHash<QString, int>::iterator i;
|
||||
for (i = hash.begin(); i != hash.end(); ++i)
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
//! [17]
|
||||
|
||||
|
||||
@ -274,7 +274,7 @@ hash.insert("December", 12);
|
||||
|
||||
QHash<QString, int>::const_iterator i;
|
||||
for (i = hash.constBegin(); i != hash.constEnd(); ++i)
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
//! [23]
|
||||
|
||||
|
||||
@ -296,23 +296,23 @@ hash3 = hash1 + hash2;
|
||||
//! [25]
|
||||
QList<int> values = hash.values("plenty");
|
||||
for (int i = 0; i < values.size(); ++i)
|
||||
cout << values.at(i) << endl;
|
||||
cout << values.at(i) << Qt::endl;
|
||||
//! [25]
|
||||
|
||||
|
||||
//! [26]
|
||||
QMultiHash<QString, int>::iterator i = hash.find("plenty");
|
||||
while (i != hash.end() && i.key() == "plenty") {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [26]
|
||||
|
||||
//! [27]
|
||||
for (QHash<int, QString>::const_iterator it = hash.cbegin(), end = hash.cend(); it != end; ++it) {
|
||||
cout << "The key: " << it.key() << endl
|
||||
cout << "The value: " << it.value() << endl;
|
||||
cout << "Also the value: " << (*it) << endl;
|
||||
cout << "The key: " << it.key() << Qt::endl
|
||||
cout << "The value: " << it.value() << Qt::endl;
|
||||
cout << "Also the value: " << (*it) << Qt::endl;
|
||||
}
|
||||
//! [27]
|
||||
|
||||
|
@ -112,7 +112,7 @@ list.append("December");
|
||||
|
||||
QLinkedList<QString>::iterator i;
|
||||
for (i = list.begin(); i != list.end(); ++i)
|
||||
cout << *i << endl;
|
||||
cout << *i << Qt::endl;
|
||||
//! [7]
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ QLinkedList<QString> list;
|
||||
QLinkedList<QString>::iterator it = qFind(list.begin(),
|
||||
list.end(), "Joel");
|
||||
if (it != list.end())
|
||||
cout << "Found Joel" << endl;
|
||||
cout << "Found Joel" << Qt::endl;
|
||||
//! [8]
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ list.append("December");
|
||||
|
||||
QLinkedList<QString>::const_iterator i;
|
||||
for (i = list.constBegin(); i != list.constEnd(); ++i)
|
||||
cout << *i << endl;
|
||||
cout << *i << Qt::endl;
|
||||
//! [14]
|
||||
|
||||
|
||||
@ -192,7 +192,7 @@ QLinkedList<QString> list;
|
||||
QLinkedList<QString>::iterator it = qFind(list.constBegin(),
|
||||
list.constEnd(), "Joel");
|
||||
if (it != list.constEnd())
|
||||
cout << "Found Joel" << endl;
|
||||
cout << "Found Joel" << Qt::endl;
|
||||
//! [15]
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@ if (list[0] == "Bob")
|
||||
//! [3]
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
if (list.at(i) == "Jane")
|
||||
cout << "Found Jane at position " << i << endl;
|
||||
cout << "Found Jane at position " << i << Qt::endl;
|
||||
}
|
||||
//! [3]
|
||||
|
||||
@ -89,7 +89,7 @@ while (!list.isEmpty())
|
||||
//! [5]
|
||||
int i = list.indexOf("Jane");
|
||||
if (i != -1)
|
||||
cout << "First occurrence of Jane is at position " << i << endl;
|
||||
cout << "First occurrence of Jane is at position " << i << Qt::endl;
|
||||
//! [5]
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ list.append("December");
|
||||
|
||||
QList<QString>::iterator i;
|
||||
for (i = list.begin(); i != list.end(); ++i)
|
||||
cout << *i << endl;
|
||||
cout << *i << Qt::endl;
|
||||
//! [15]
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ list.append("December");
|
||||
|
||||
QList<QString>::const_iterator i;
|
||||
for (i = list.constBegin(); i != list.constEnd(); ++i)
|
||||
cout << *i << endl;
|
||||
cout << *i << Qt::endl;
|
||||
//! [19]
|
||||
|
||||
|
||||
|
@ -89,7 +89,7 @@ QMap<int, QWidget *> map;
|
||||
...
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
if (map[i] == okButton)
|
||||
cout << "Found button at index " << i << endl;
|
||||
cout << "Found button at index " << i << Qt::endl;
|
||||
}
|
||||
//! [6]
|
||||
|
||||
@ -98,7 +98,7 @@ for (int i = 0; i < 1000; ++i) {
|
||||
QMapIterator<QString, int> i(map);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
}
|
||||
//! [7]
|
||||
|
||||
@ -106,7 +106,7 @@ while (i.hasNext()) {
|
||||
//! [8]
|
||||
QMap<QString, int>::const_iterator i = map.constBegin();
|
||||
while (i != map.constEnd()) {
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [8]
|
||||
@ -122,14 +122,14 @@ map.insert("plenty", 2000);
|
||||
//! [10]
|
||||
QList<int> values = map.values("plenty");
|
||||
for (int i = 0; i < values.size(); ++i)
|
||||
cout << values.at(i) << endl;
|
||||
cout << values.at(i) << Qt::endl;
|
||||
//! [10]
|
||||
|
||||
|
||||
//! [11]
|
||||
QMap<QString, int>::iterator i = map.find("plenty");
|
||||
while (i != map.end() && i.key() == "plenty") {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [11]
|
||||
@ -139,7 +139,7 @@ while (i != map.end() && i.key() == "plenty") {
|
||||
QMap<QString, int> map;
|
||||
...
|
||||
foreach (int value, map)
|
||||
cout << value << endl;
|
||||
cout << value << Qt::endl;
|
||||
//! [12]
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@ QMap<QString, int> map;
|
||||
...
|
||||
QMap<QString, int>::const_iterator i = map.find("HDR");
|
||||
while (i != map.end() && i.key() == "HDR") {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [14]
|
||||
@ -201,7 +201,7 @@ QMap<QString, int> map;
|
||||
QMap<QString, int>::const_iterator i = map.lowerBound("HDR");
|
||||
QMap<QString, int>::const_iterator upperBound = map.upperBound("HDR");
|
||||
while (i != upperBound) {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [16]
|
||||
@ -230,7 +230,7 @@ map.insert("December", 12);
|
||||
|
||||
QMap<QString, int>::iterator i;
|
||||
for (i = map.begin(); i != map.end(); ++i)
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
//! [18]
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ map.insert("December", 12);
|
||||
|
||||
QMap<QString, int>::const_iterator i;
|
||||
for (i = map.constBegin(); i != map.constEnd(); ++i)
|
||||
cout << i.key() << ": " << i.value() << endl;
|
||||
cout << i.key() << ": " << i.value() << Qt::endl;
|
||||
//! [24]
|
||||
|
||||
|
||||
@ -310,23 +310,23 @@ map3 = map1 + map2;
|
||||
//! [26]
|
||||
QList<int> values = map.values("plenty");
|
||||
for (int i = 0; i < values.size(); ++i)
|
||||
cout << values.at(i) << endl;
|
||||
cout << values.at(i) << Qt::endl;
|
||||
//! [26]
|
||||
|
||||
|
||||
//! [27]
|
||||
QMultiMap<QString, int>::iterator i = map.find("plenty");
|
||||
while (i != map.end() && i.key() == "plenty") {
|
||||
cout << i.value() << endl;
|
||||
cout << i.value() << Qt::endl;
|
||||
++i;
|
||||
}
|
||||
//! [27]
|
||||
|
||||
//! [keyiterator1]
|
||||
for (QMap<int, QString>::const_iterator it = map.cbegin(), end = map.cend(); it != end; ++it) {
|
||||
cout << "The key: " << it.key() << endl
|
||||
cout << "The value: " << it.value() << endl;
|
||||
cout << "Also the value: " << (*it) << endl;
|
||||
cout << "The key: " << it.key() << Qt::endl
|
||||
cout << "The value: " << it.value() << Qt::endl;
|
||||
cout << "Also the value: " << (*it) << Qt::endl;
|
||||
}
|
||||
//! [keyiterator1]
|
||||
|
||||
|
@ -54,5 +54,5 @@ queue.enqueue(1);
|
||||
queue.enqueue(2);
|
||||
queue.enqueue(3);
|
||||
while (!queue.isEmpty())
|
||||
cout << queue.dequeue() << endl;
|
||||
cout << queue.dequeue() << Qt::endl;
|
||||
//! [0]
|
||||
|
@ -72,9 +72,9 @@ while (i.hasNext())
|
||||
{
|
||||
//! [2]
|
||||
QStringIterator i(u"𝄞 is the G clef");
|
||||
qDebug() << hex << i.next(); // will print 1d11e (U+1D11E, MUSICAL SYMBOL G CLEF)
|
||||
qDebug() << hex << i.next(); // will print 20 (U+0020, SPACE)
|
||||
qDebug() << hex << i.next(); // will print 69 (U+0069, LATIN SMALL LETTER I)
|
||||
qDebug() << Qt::hex << i.next(); // will print 1d11e (U+1D11E, MUSICAL SYMBOL G CLEF)
|
||||
qDebug() << Qt::hex << i.next(); // will print 20 (U+0020, SPACE)
|
||||
qDebug() << Qt::hex << i.next(); // will print 69 (U+0069, LATIN SMALL LETTER I)
|
||||
//! [2]
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ if (vector[0] == "Liz")
|
||||
//! [4]
|
||||
for (int i = 0; i < vector.size(); ++i) {
|
||||
if (vector.at(i) == "Alfonso")
|
||||
cout << "Found Alfonso at position " << i << endl;
|
||||
cout << "Found Alfonso at position " << i << Qt::endl;
|
||||
}
|
||||
//! [4]
|
||||
|
||||
@ -81,7 +81,7 @@ for (int i = 0; i < vector.size(); ++i) {
|
||||
//! [5]
|
||||
int i = vector.indexOf("Harumi");
|
||||
if (i != -1)
|
||||
cout << "First occurrence of Harumi is at position " << i << endl;
|
||||
cout << "First occurrence of Harumi is at position " << i << Qt::endl;
|
||||
//! [5]
|
||||
|
||||
|
||||
|
@ -60,6 +60,6 @@ int main(int argc, char *argv[])
|
||||
stack.push(2);
|
||||
stack.push(3);
|
||||
while (!stack.isEmpty())
|
||||
cout << stack.pop() << endl;
|
||||
cout << stack.pop() << Qt::endl;
|
||||
//! [0]
|
||||
}
|
||||
|
@ -71,20 +71,20 @@ Widget::Widget(QWidget *parent)
|
||||
|
||||
//! [1]
|
||||
for (int i = 0; i < fonts.size(); ++i)
|
||||
cout << fonts.at(i).toLocal8Bit().constData() << endl;
|
||||
cout << fonts.at(i).toLocal8Bit().constData() << Qt::endl;
|
||||
//! [1]
|
||||
|
||||
//! [2]
|
||||
QStringListIterator javaStyleIterator(fonts);
|
||||
while (javaStyleIterator.hasNext())
|
||||
cout << javaStyleIterator.next().toLocal8Bit().constData() << endl;
|
||||
cout << javaStyleIterator.next().toLocal8Bit().constData() << Qt::endl;
|
||||
//! [2]
|
||||
|
||||
//! [3]
|
||||
QStringList::const_iterator constIterator;
|
||||
for (constIterator = fonts.constBegin(); constIterator != fonts.constEnd();
|
||||
++constIterator)
|
||||
cout << (*constIterator).toLocal8Bit().constData() << endl;
|
||||
cout << (*constIterator).toLocal8Bit().constData() << Qt::endl;
|
||||
//! [3]
|
||||
|
||||
//! [4]
|
||||
|
@ -166,7 +166,7 @@ void QDebug::putUcs4(uint ucs4)
|
||||
{
|
||||
maybeQuote('\'');
|
||||
if (ucs4 < 0x20) {
|
||||
stream->ts << "\\x" << hex << ucs4 << reset;
|
||||
stream->ts << "\\x" << Qt::hex << ucs4 << Qt::reset;
|
||||
} else if (ucs4 < 0x80) {
|
||||
stream->ts << char(ucs4);
|
||||
} else {
|
||||
@ -174,7 +174,7 @@ void QDebug::putUcs4(uint ucs4)
|
||||
stream->ts << "\\u" << qSetFieldWidth(4);
|
||||
else
|
||||
stream->ts << "\\U" << qSetFieldWidth(8);
|
||||
stream->ts << hex << qSetPadChar(QLatin1Char('0')) << ucs4 << reset;
|
||||
stream->ts << Qt::hex << qSetPadChar(QLatin1Char('0')) << ucs4 << Qt::reset;
|
||||
}
|
||||
maybeQuote('\'');
|
||||
}
|
||||
@ -834,7 +834,7 @@ QDebug &QDebug::resetFormat()
|
||||
that QDebugStateSaver stores for the duration of the current block.
|
||||
|
||||
The settings of the internal QTextStream are also saved and restored,
|
||||
so that using << hex in a QDebug operator doesn't affect other QDebug
|
||||
so that using << Qt::hex in a QDebug operator doesn't affect other QDebug
|
||||
operators.
|
||||
|
||||
\since 5.1
|
||||
|
@ -350,7 +350,7 @@ void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, Int value)
|
||||
{
|
||||
const QDebugStateSaver saver(debug);
|
||||
debug.resetFormat();
|
||||
debug.nospace() << "QFlags(" << hex << showbase;
|
||||
debug.nospace() << "QFlags(" << Qt::hex << Qt::showbase;
|
||||
bool needSeparator = false;
|
||||
for (uint i = 0; i < sizeofT * 8; ++i) {
|
||||
if (value & (Int(1) << i)) {
|
||||
|
@ -388,7 +388,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
|
||||
const inotify_event &event = **it;
|
||||
++it;
|
||||
|
||||
// qDebug() << "inotify event, wd" << event.wd << "mask" << hex << event.mask;
|
||||
// qDebug() << "inotify event, wd" << event.wd << "mask" << Qt::hex << event.mask;
|
||||
|
||||
int id = event.wd;
|
||||
QString path = getPathFromID(id);
|
||||
|
@ -79,7 +79,7 @@ static Qt::HANDLE createChangeNotification(const QString &path, uint flags)
|
||||
nativePath.append(QLatin1Char('\\'));
|
||||
const HANDLE result = FindFirstChangeNotification(reinterpret_cast<const wchar_t *>(nativePath.utf16()),
|
||||
FALSE, flags);
|
||||
DEBUG() << __FUNCTION__ << nativePath << hex <<showbase << flags << "returns" << result;
|
||||
DEBUG() << __FUNCTION__ << nativePath << Qt::hex <<showbase << flags << "returns" << result;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -432,7 +432,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
// Requesting to add a file whose directory has been added previously.
|
||||
// Recreate the notification handle to add the missing notification attributes
|
||||
// for files (FILE_NOTIFY_CHANGE_ATTRIBUTES...)
|
||||
DEBUG() << "recreating" << absolutePath << hex << showbase << hit.value().flags
|
||||
DEBUG() << "recreating" << absolutePath << Qt::hex << Qt::showbase << hit.value().flags
|
||||
<< "->" << flags;
|
||||
const Qt::HANDLE fileHandle = createChangeNotification(absolutePath, flags);
|
||||
if (fileHandle != INVALID_HANDLE_VALUE) {
|
||||
|
@ -190,7 +190,7 @@ Q_ENUM_PRINTER(Result);
|
||||
|
||||
QDebug operator<<(QDebug s, timespec tv)
|
||||
{
|
||||
s << tv.tv_sec << "." << qSetFieldWidth(9) << qSetPadChar(QChar(48)) << tv.tv_nsec << reset;
|
||||
s << tv.tv_sec << "." << qSetFieldWidth(9) << qSetPadChar(QChar(48)) << tv.tv_nsec << Qt::reset;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ static timespec roundToMillisecond(timespec val)
|
||||
QDebug operator<<(QDebug s, timeval tv)
|
||||
{
|
||||
QDebugStateSaver saver(s);
|
||||
s.nospace() << tv.tv_sec << "." << qSetFieldWidth(6) << qSetPadChar(QChar(48)) << tv.tv_usec << reset;
|
||||
s.nospace() << tv.tv_sec << "." << qSetFieldWidth(6) << qSetPadChar(QChar(48)) << tv.tv_usec << Qt::reset;
|
||||
return s;
|
||||
}
|
||||
QDebug operator<<(QDebug s, Qt::TimerType t)
|
||||
@ -373,7 +373,7 @@ static void calculateNextTimeout(QTimerInfo *t, timespec currentTime)
|
||||
|
||||
#ifdef QTIMERINFO_DEBUG
|
||||
if (t->timerType != Qt::PreciseTimer)
|
||||
qDebug() << "timer" << t->timerType << hex << t->id << dec << "interval" << t->interval
|
||||
qDebug() << "timer" << t->timerType << Qt::hex << t->id << Qt::dec << "interval" << t->interval
|
||||
<< "originally expected at" << t->expected << "will fire at" << t->timeout
|
||||
<< "or" << (t->timeout - t->expected) << "s late";
|
||||
#endif
|
||||
@ -500,7 +500,7 @@ void QTimerInfoList::registerTimer(int timerId, int interval, Qt::TimerType time
|
||||
t->cumulativeError = 0;
|
||||
t->count = 0;
|
||||
if (t->timerType != Qt::PreciseTimer)
|
||||
qDebug() << "timer" << t->timerType << hex <<t->id << dec << "interval" << t->interval << "expected at"
|
||||
qDebug() << "timer" << t->timerType << Qt::hex <<t->id << Qt::dec << "interval" << t->interval << "expected at"
|
||||
<< t->expected << "will fire first at" << t->timeout;
|
||||
#endif
|
||||
}
|
||||
@ -620,7 +620,7 @@ int QTimerInfoList::activateTimers()
|
||||
currentTimerInfo->cumulativeError += diff;
|
||||
++currentTimerInfo->count;
|
||||
if (currentTimerInfo->timerType != Qt::PreciseTimer)
|
||||
qDebug() << "timer" << currentTimerInfo->timerType << hex << currentTimerInfo->id << dec << "interval"
|
||||
qDebug() << "timer" << currentTimerInfo->timerType << Qt::hex << currentTimerInfo->id << Qt::dec << "interval"
|
||||
<< currentTimerInfo->interval << "firing at" << currentTime
|
||||
<< "(orig" << currentTimerInfo->expected << "scheduled at" << currentTimerInfo->timeout
|
||||
<< ") off by" << diff << "activation" << currentTimerInfo->count
|
||||
|
@ -239,7 +239,7 @@ void QFactoryLoader::update()
|
||||
library = QLibraryPrivate::findOrCreate(QFileInfo(fileName).canonicalFilePath());
|
||||
if (!library->isPlugin()) {
|
||||
if (qt_debug_component()) {
|
||||
qDebug() << library->errorString << endl
|
||||
qDebug() << library->errorString << Qt::endl
|
||||
<< " not a plugin";
|
||||
}
|
||||
library->release();
|
||||
|
@ -2941,7 +2941,7 @@ static QDebug debugContents(QDebug &dbg, const QCborValue &v)
|
||||
}
|
||||
if (v.isSimpleType())
|
||||
return dbg << v.toSimpleType();
|
||||
return dbg << "<unknown type " << hex << int(v.type()) << dec << '>';
|
||||
return dbg << "<unknown type " << Qt::hex << int(v.type()) << Qt::dec << '>';
|
||||
}
|
||||
QDebug operator<<(QDebug dbg, const QCborValue &v)
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ QJsonDocument Parser::parse(QJsonParseError *error)
|
||||
eatBOM();
|
||||
char token = nextToken();
|
||||
|
||||
DEBUG << hex << (uint)token;
|
||||
DEBUG << Qt::hex << (uint)token;
|
||||
if (token == BeginArray) {
|
||||
if (!parseArray())
|
||||
goto error;
|
||||
|
@ -2356,7 +2356,7 @@ void QTextStreamPrivate::putNumber(qulonglong number, bool negative)
|
||||
} else if (negative) {
|
||||
// Workaround for backward compatibility for writing negative
|
||||
// numbers in octal and hex:
|
||||
// QTextStream(result) << showbase << hex << -1 << oct << -1
|
||||
// QTextStream(result) << Qt::showbase << Qt::hex << -1 << oct << -1
|
||||
// should output: -0x1 -0b1
|
||||
result = dd->unsLongLongToString(number, -1, base, -1, flags);
|
||||
result.prepend(locale.negativeSign());
|
||||
@ -2978,7 +2978,7 @@ QTextStream ¢er(QTextStream &stream)
|
||||
*/
|
||||
QTextStream &endl(QTextStream &stream)
|
||||
{
|
||||
return stream << QLatin1Char('\n') << flush;
|
||||
return stream << QLatin1Char('\n') << Qt::flush;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -826,9 +826,9 @@ static int ucstricmp(const QChar *a, const QChar *ae, const QChar *b, const QCha
|
||||
uint alast = 0;
|
||||
uint blast = 0;
|
||||
while (a < e) {
|
||||
// qDebug() << hex << alast << blast;
|
||||
// qDebug() << hex << "*a=" << *a << "alast=" << alast << "folded=" << foldCase (*a, alast);
|
||||
// qDebug() << hex << "*b=" << *b << "blast=" << blast << "folded=" << foldCase (*b, blast);
|
||||
// qDebug() << Qt::hex << alast << blast;
|
||||
// qDebug() << Qt::hex << "*a=" << *a << "alast=" << alast << "folded=" << foldCase (*a, alast);
|
||||
// qDebug() << Qt::hex << "*b=" << *b << "blast=" << blast << "folded=" << foldCase (*b, blast);
|
||||
int diff = foldCase(a->unicode(), alast) - foldCase(b->unicode(), blast);
|
||||
if ((diff))
|
||||
return diff;
|
||||
|
@ -1858,7 +1858,7 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
|
||||
return d;
|
||||
}
|
||||
d.nospace();
|
||||
d << "QAccessibleInterface(" << hex << (const void *) iface << dec;
|
||||
d << "QAccessibleInterface(" << Qt::hex << (const void *) iface << Qt::dec;
|
||||
if (iface->isValid()) {
|
||||
d << " name=" << iface->text(QAccessible::Name) << ' ';
|
||||
d << "role=" << qAccessibleRoleString(iface->role()) << ' ';
|
||||
@ -1897,7 +1897,7 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace() << "QAccessibleEvent(";
|
||||
if (ev.object()) {
|
||||
d.nospace() << "object=" << hex << ev.object() << dec;
|
||||
d.nospace() << "object=" << Qt::hex << ev.object() << Qt::dec;
|
||||
d.nospace() << "child=" << ev.child();
|
||||
} else {
|
||||
d.nospace() << "no object, uniqueId=" << ev.uniqueId();
|
||||
|
@ -59,7 +59,7 @@ int main(int argv, char **args)
|
||||
|
||||
//! [0]
|
||||
for (QTextBlock it = doc->begin(); it != doc->end(); it = it.next())
|
||||
cout << it.text().toStdString() << endl;
|
||||
cout << it.text().toStdString() << Qt::endl;
|
||||
//! [0]
|
||||
|
||||
return 0;
|
||||
|
@ -1496,7 +1496,7 @@ QDebug operator<<(QDebug dbg, const QIcon &i)
|
||||
if (!i.name().isEmpty())
|
||||
dbg << i.name() << ',';
|
||||
dbg << "availableSizes[normal,Off]=" << i.availableSizes()
|
||||
<< ",cacheKey=" << showbase << hex << i.cacheKey() << dec << noshowbase;
|
||||
<< ",cacheKey=" << Qt::showbase << Qt::hex << i.cacheKey() << Qt::dec << Qt::noshowbase;
|
||||
}
|
||||
dbg << ')';
|
||||
return dbg;
|
||||
|
@ -1689,7 +1689,7 @@ QDebug operator<<(QDebug dbg, const QPixmap &r)
|
||||
} else {
|
||||
dbg << r.size() << ",depth=" << r.depth()
|
||||
<< ",devicePixelRatio=" << r.devicePixelRatio()
|
||||
<< ",cacheKey=" << showbase << hex << r.cacheKey() << dec << noshowbase;
|
||||
<< ",cacheKey=" << Qt::showbase << Qt::hex << r.cacheKey() << Qt::dec << Qt::noshowbase;
|
||||
}
|
||||
dbg << ')';
|
||||
return dbg;
|
||||
|
@ -1129,8 +1129,8 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
|
||||
|
||||
// write header
|
||||
QTextStream s(device);
|
||||
s << "/* XPM */" << endl
|
||||
<< "static char *" << fbname(fileName) << "[]={" << endl
|
||||
s << "/* XPM */" << Qt::endl
|
||||
<< "static char *" << fbname(fileName) << "[]={" << Qt::endl
|
||||
<< '\"' << w << ' ' << h << ' ' << ncolors << ' ' << cpp << '\"';
|
||||
|
||||
// write palette
|
||||
@ -1147,7 +1147,7 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
|
||||
qGreen(color),
|
||||
qBlue(color));
|
||||
++c;
|
||||
s << ',' << endl << line;
|
||||
s << ',' << Qt::endl << line;
|
||||
}
|
||||
|
||||
// write pixels, limit to 4 characters per pixel
|
||||
@ -1169,9 +1169,9 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
|
||||
}
|
||||
}
|
||||
}
|
||||
s << ',' << endl << '\"' << line << '\"';
|
||||
s << ',' << Qt::endl << '\"' << line << '\"';
|
||||
}
|
||||
s << "};" << endl;
|
||||
s << "};" << Qt::endl;
|
||||
return (s.status() == QTextStream::Ok);
|
||||
}
|
||||
|
||||
|
@ -3764,13 +3764,13 @@ static inline void formatTouchEvent(QDebug d, const QTouchEvent &t)
|
||||
|
||||
static void formatUnicodeString(QDebug d, const QString &s)
|
||||
{
|
||||
d << '"' << hex;
|
||||
d << '"' << Qt::hex;
|
||||
for (int i = 0; i < s.size(); ++i) {
|
||||
if (i)
|
||||
d << ',';
|
||||
d << "U+" << s.at(i).unicode();
|
||||
}
|
||||
d << dec << '"';
|
||||
d << Qt::dec << '"';
|
||||
}
|
||||
|
||||
static inline void formatInputMethodEvent(QDebug d, const QInputMethodEvent *e)
|
||||
@ -3807,8 +3807,8 @@ static inline void formatInputMethodQueryEvent(QDebug d, const QInputMethodQuery
|
||||
QDebugStateSaver saver(d);
|
||||
d.noquote();
|
||||
const Qt::InputMethodQueries queries = e->queries();
|
||||
d << "QInputMethodQueryEvent(queries=" << showbase << hex << int(queries)
|
||||
<< noshowbase << dec << ", {";
|
||||
d << "QInputMethodQueryEvent(queries=" << Qt::showbase << Qt::hex << int(queries)
|
||||
<< Qt::noshowbase << Qt::dec << ", {";
|
||||
for (unsigned mask = 1; mask <= Qt::ImInputItemClipRectangle; mask<<=1) {
|
||||
if (queries & mask) {
|
||||
const Qt::InputMethodQuery query = static_cast<Qt::InputMethodQuery>(mask);
|
||||
@ -4001,7 +4001,7 @@ QDebug operator<<(QDebug dbg, const QTouchEvent::TouchPoint &tp)
|
||||
{
|
||||
QDebugStateSaver saver(dbg);
|
||||
dbg.nospace();
|
||||
dbg << "TouchPoint(" << hex << tp.id() << dec << " (";
|
||||
dbg << "TouchPoint(" << Qt::hex << tp.id() << Qt::dec << " (";
|
||||
QtDebugUtils::formatQPoint(dbg, tp.pos());
|
||||
dbg << ") ";
|
||||
QtDebugUtils::formatQEnum(dbg, tp.state());
|
||||
|
@ -1204,7 +1204,7 @@ QDebug operator<<(QDebug dbg, const QPalette &p)
|
||||
QDebugStateSaver saver(dbg);
|
||||
QDebug nospace = dbg.nospace();
|
||||
const uint mask = p.resolve();
|
||||
nospace << "QPalette(resolve=" << hex << showbase << mask << ',';
|
||||
nospace << "QPalette(resolve=" << Qt::hex << Qt::showbase << mask << ',';
|
||||
for (int role = 0; role < (int)QPalette::NColorRoles; ++role) {
|
||||
if (mask & (1<<role)) {
|
||||
if (role)
|
||||
@ -1220,7 +1220,7 @@ QDebug operator<<(QDebug dbg, const QPalette &p)
|
||||
nospace << ']';
|
||||
}
|
||||
}
|
||||
nospace << ')' << noshowbase << dec;
|
||||
nospace << ')' << Qt::noshowbase << Qt::dec;
|
||||
return dbg;
|
||||
}
|
||||
#endif
|
||||
|
@ -768,7 +768,7 @@ QPixmap QScreen::grabWindow(WId window, int x, int y, int width, int height)
|
||||
static inline void formatRect(QDebug &debug, const QRect r)
|
||||
{
|
||||
debug << r.width() << 'x' << r.height()
|
||||
<< forcesign << r.x() << r.y() << noforcesign;
|
||||
<< Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
|
||||
}
|
||||
|
||||
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QScreen *screen)
|
||||
|
@ -2835,13 +2835,13 @@ QDebug operator<<(QDebug debug, const QWindow *window)
|
||||
if (window->isTopLevel())
|
||||
debug << ", toplevel";
|
||||
debug << ", " << geometry.width() << 'x' << geometry.height()
|
||||
<< forcesign << geometry.x() << geometry.y() << noforcesign;
|
||||
<< Qt::forcesign << geometry.x() << geometry.y() << Qt::noforcesign;
|
||||
const QMargins margins = window->frameMargins();
|
||||
if (!margins.isNull())
|
||||
debug << ", margins=" << margins;
|
||||
debug << ", devicePixelRatio=" << window->devicePixelRatio();
|
||||
if (const QPlatformWindow *platformWindow = window->handle())
|
||||
debug << ", winId=0x" << hex << platformWindow->winId() << dec;
|
||||
debug << ", winId=0x" << Qt::hex << platformWindow->winId() << Qt::dec;
|
||||
if (const QScreen *screen = window->screen())
|
||||
debug << ", on " << screen->name();
|
||||
}
|
||||
|
@ -351,11 +351,11 @@ QDebug operator<<(QDebug dbg, const QGenericMatrix<N, M, T> &m)
|
||||
QDebugStateSaver saver(dbg);
|
||||
dbg.nospace() << "QGenericMatrix<" << N << ", " << M
|
||||
<< ", " << QTypeInfo<T>::name()
|
||||
<< ">(" << endl << qSetFieldWidth(10);
|
||||
<< ">(" << Qt::endl << qSetFieldWidth(10);
|
||||
for (int row = 0; row < M; ++row) {
|
||||
for (int col = 0; col < N; ++col)
|
||||
dbg << m(row, col);
|
||||
dbg << endl;
|
||||
dbg << Qt::endl;
|
||||
}
|
||||
dbg << qSetFieldWidth(0) << ')';
|
||||
return dbg;
|
||||
|
@ -2037,12 +2037,12 @@ QDebug operator<<(QDebug dbg, const QMatrix4x4 &m)
|
||||
}
|
||||
|
||||
// Output in row-major order because it is more human-readable.
|
||||
dbg.nospace() << "QMatrix4x4(type:" << bits.constData() << endl
|
||||
dbg.nospace() << "QMatrix4x4(type:" << bits.constData() << Qt::endl
|
||||
<< qSetFieldWidth(10)
|
||||
<< m(0, 0) << m(0, 1) << m(0, 2) << m(0, 3) << endl
|
||||
<< m(1, 0) << m(1, 1) << m(1, 2) << m(1, 3) << endl
|
||||
<< m(2, 0) << m(2, 1) << m(2, 2) << m(2, 3) << endl
|
||||
<< m(3, 0) << m(3, 1) << m(3, 2) << m(3, 3) << endl
|
||||
<< m(0, 0) << m(0, 1) << m(0, 2) << m(0, 3) << Qt::endl
|
||||
<< m(1, 0) << m(1, 1) << m(1, 2) << m(1, 3) << Qt::endl
|
||||
<< m(2, 0) << m(2, 1) << m(2, 2) << m(2, 3) << Qt::endl
|
||||
<< m(3, 0) << m(3, 1) << m(3, 2) << m(3, 3) << Qt::endl
|
||||
<< qSetFieldWidth(0) << ')';
|
||||
return dbg;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ QDebug operator<<(QDebug d, const QOpenGLConfig::Gpu &g)
|
||||
d.nospace();
|
||||
d << "Gpu(";
|
||||
if (g.isValid()) {
|
||||
d << "vendor=" << hex << showbase <<g.vendorId << ", device=" << g.deviceId
|
||||
d << "vendor=" << Qt::hex << Qt::showbase <<g.vendorId << ", device=" << g.deviceId
|
||||
<< "version=" << g.driverVersion;
|
||||
} else {
|
||||
d << 0;
|
||||
|
@ -71,10 +71,10 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
|
||||
const int ix = 0x00010000 * sx;
|
||||
const int iy = 0x00010000 * sy;
|
||||
|
||||
// qDebug() << "scale:" << endl
|
||||
// << " - target" << targetRect << endl
|
||||
// << " - source" << srcRect << endl
|
||||
// << " - clip" << clip << endl
|
||||
// qDebug() << "scale:" << Qt::endl
|
||||
// << " - target" << targetRect << Qt::endl
|
||||
// << " - source" << srcRect << Qt::endl
|
||||
// << " - clip" << clip << Qt::endl
|
||||
// << " - sx=" << sx << " sy=" << sy << " ix=" << ix << " iy=" << iy;
|
||||
|
||||
QRect tr = targetRect.normalized().toRect();
|
||||
@ -162,10 +162,10 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
|
||||
const int ix = 0x00010000 * sx;
|
||||
const int iy = 0x00010000 * sy;
|
||||
|
||||
// qDebug() << "scale:" << endl
|
||||
// << " - target" << targetRect << endl
|
||||
// << " - source" << srcRect << endl
|
||||
// << " - clip" << clip << endl
|
||||
// qDebug() << "scale:" << Qt::endl
|
||||
// << " - target" << targetRect << Qt::endl
|
||||
// << " - source" << srcRect << Qt::endl
|
||||
// << " - clip" << clip << Qt::endl
|
||||
// << " - sx=" << sx << " sy=" << sy << " ix=" << ix << " iy=" << iy;
|
||||
|
||||
QRect tr = targetRect.normalized().toRect();
|
||||
|
@ -898,7 +898,7 @@ void QRasterPaintEngine::renderHintsChanged()
|
||||
QRasterPaintEngineState *s = state();
|
||||
|
||||
#ifdef QT_DEBUG_DRAW
|
||||
qDebug() << "QRasterPaintEngine::renderHintsChanged()" << hex << s->renderHints;
|
||||
qDebug() << "QRasterPaintEngine::renderHintsChanged()" << Qt::hex << s->renderHints;
|
||||
#endif
|
||||
|
||||
bool was_aa = s->flags.antialiased;
|
||||
@ -1745,7 +1745,7 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
|
||||
QRectF rf = path.controlPointRect();
|
||||
qDebug() << "QRasterPaintEngine::fill(): "
|
||||
<< "size=" << path.elementCount()
|
||||
<< ", hints=" << hex << path.hints()
|
||||
<< ", hints=" << Qt::hex << path.hints()
|
||||
<< rf << brush;
|
||||
#endif
|
||||
|
||||
|
@ -140,7 +140,7 @@ QDebug Q_GUI_EXPORT &operator<<(QDebug &s, const QVectorPath &path)
|
||||
QDebugStateSaver saver(s);
|
||||
QRectF rf = path.controlPointRect();
|
||||
s << "QVectorPath(size:" << path.elementCount()
|
||||
<< " hints:" << hex << path.hints()
|
||||
<< " hints:" << Qt::hex << path.hints()
|
||||
<< rf << ')';
|
||||
return s;
|
||||
}
|
||||
|
@ -3576,10 +3576,10 @@ void QPainterPath::computeControlPointRect() const
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug s, const QPainterPath &p)
|
||||
{
|
||||
s.nospace() << "QPainterPath: Element count=" << p.elementCount() << endl;
|
||||
s.nospace() << "QPainterPath: Element count=" << p.elementCount() << Qt::endl;
|
||||
const char *types[] = {"MoveTo", "LineTo", "CurveTo", "CurveToData"};
|
||||
for (int i=0; i<p.elementCount(); ++i) {
|
||||
s.nospace() << " -> " << types[p.elementAt(i).type] << "(x=" << p.elementAt(i).x << ", y=" << p.elementAt(i).y << ')' << endl;
|
||||
s.nospace() << " -> " << types[p.elementAt(i).type] << "(x=" << p.elementAt(i).x << ", y=" << p.elementAt(i).y << ')' << Qt::endl;
|
||||
|
||||
}
|
||||
return s;
|
||||
|
@ -1213,7 +1213,7 @@ void QFontEngine::loadKerningPairs(QFixed scalingFactor)
|
||||
end:
|
||||
std::sort(kerning_pairs.begin(), kerning_pairs.end());
|
||||
// for (int i = 0; i < kerning_pairs.count(); ++i)
|
||||
// qDebug() << 'i' << i << "left_right" << hex << kerning_pairs.at(i).left_right;
|
||||
// qDebug() << 'i' << i << "left_right" << Qt::hex << kerning_pairs.at(i).left_right;
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,9 +140,9 @@ static inline const uchar *verifyTag(const uchar *tagPtr, const uchar *endPtr)
|
||||
}
|
||||
#if defined(DEBUG_HEADER)
|
||||
if (length == 1)
|
||||
qDebug() << "tag data" << hex << *tagPtr;
|
||||
qDebug() << "tag data" << Qt::hex << *tagPtr;
|
||||
else if (length == 4)
|
||||
qDebug() << "tag data" << hex << tagPtr[0] << tagPtr[1] << tagPtr[2] << tagPtr[3];
|
||||
qDebug() << "tag data" << Qt::hex << tagPtr[0] << tagPtr[1] << tagPtr[2] << tagPtr[3];
|
||||
#endif
|
||||
}
|
||||
return tagPtr + length;
|
||||
@ -367,7 +367,7 @@ bool QFontEngineQPF2::stringToCMap(const QChar *str, int len, QGlyphLayout *glyp
|
||||
#if 0 && defined(DEBUG_FONTENGINE)
|
||||
QChar c(uc);
|
||||
if (!findGlyph(glyphs[glyph_pos].glyph) && !seenGlyphs.contains(c))
|
||||
qDebug() << "glyph for character" << c << '/' << hex << uc << "is" << dec << glyphs[glyph_pos].glyph;
|
||||
qDebug() << "glyph for character" << c << '/' << Qt::hex << uc << "is" << Qt::dec << glyphs[glyph_pos].glyph;
|
||||
|
||||
seenGlyphs.insert(c);
|
||||
#endif
|
||||
|
@ -990,7 +990,7 @@ struct QBidiAlgorithm {
|
||||
BIDI_DEBUG() << "before implicit level processing:";
|
||||
IsolatedRunSequenceIterator it(runs, i);
|
||||
while (!it.atEnd()) {
|
||||
BIDI_DEBUG() << " " << *it << hex << text[*it].unicode() << analysis[*it].bidiDirection;
|
||||
BIDI_DEBUG() << " " << *it << Qt::hex << text[*it].unicode() << analysis[*it].bidiDirection;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
@ -1003,7 +1003,7 @@ struct QBidiAlgorithm {
|
||||
BIDI_DEBUG() << "after W4/W5";
|
||||
IsolatedRunSequenceIterator it(runs, i);
|
||||
while (!it.atEnd()) {
|
||||
BIDI_DEBUG() << " " << *it << hex << text[*it].unicode() << analysis[*it].bidiDirection;
|
||||
BIDI_DEBUG() << " " << *it << Qt::hex << text[*it].unicode() << analysis[*it].bidiDirection;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
@ -1089,7 +1089,7 @@ struct QBidiAlgorithm {
|
||||
if (BidiDebugEnabled) {
|
||||
BIDI_DEBUG() << ">>>> start bidi, text length" << length;
|
||||
for (int i = 0; i < length; ++i)
|
||||
BIDI_DEBUG() << hex << " (" << i << ")" << text[i].unicode() << text[i].direction();
|
||||
BIDI_DEBUG() << Qt::hex << " (" << i << ")" << text[i].unicode() << text[i].direction();
|
||||
}
|
||||
|
||||
{
|
||||
@ -1158,7 +1158,7 @@ struct QBidiAlgorithm {
|
||||
if (BidiDebugEnabled) {
|
||||
BIDI_DEBUG() << "final resolved levels:";
|
||||
for (int i = 0; i < length; ++i)
|
||||
BIDI_DEBUG() << " " << i << hex << text[i].unicode() << dec << (int)analysis[i].bidiLevel;
|
||||
BIDI_DEBUG() << " " << i << Qt::hex << text[i].unicode() << Qt::dec << (int)analysis[i].bidiLevel;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -127,7 +127,7 @@ QStringList QFreeTypeFontDatabase::addTTFile(const QByteArray &fontData, const Q
|
||||
error = FT_New_Face(library, file.constData(), index, &face);
|
||||
}
|
||||
if (error != FT_Err_Ok) {
|
||||
qDebug() << "FT_New_Face failed with index" << index << ':' << hex << error;
|
||||
qDebug() << "FT_New_Face failed with index" << index << ':' << Qt::hex << error;
|
||||
break;
|
||||
}
|
||||
numFaces = face->num_faces;
|
||||
|
@ -75,38 +75,38 @@ QWindowsSockInit2::~QWindowsSockInit2()
|
||||
#ifdef BEARER_MANAGEMENT_DEBUG
|
||||
static void printBlob(NLA_BLOB *blob)
|
||||
{
|
||||
qDebug() << "==== BEGIN NLA_BLOB ====" << endl
|
||||
qDebug() << "==== BEGIN NLA_BLOB ====" << Qt::endl
|
||||
|
||||
<< "type:" << blob->header.type << endl
|
||||
<< "size:" << blob->header.dwSize << endl
|
||||
<< "type:" << blob->header.type << Qt::endl
|
||||
<< "size:" << blob->header.dwSize << Qt::endl
|
||||
<< "next offset:" << blob->header.nextOffset;
|
||||
|
||||
switch (blob->header.type) {
|
||||
case NLA_RAW_DATA:
|
||||
qDebug() << "Raw Data" << endl
|
||||
qDebug() << "Raw Data" << Qt::endl
|
||||
<< '\t' << blob->data.rawData;
|
||||
break;
|
||||
case NLA_INTERFACE:
|
||||
qDebug() << "Interface" << endl
|
||||
<< "\ttype:" << blob->data.interfaceData.dwType << endl
|
||||
<< "\tspeed:" << blob->data.interfaceData.dwSpeed << endl
|
||||
qDebug() << "Interface" << Qt::endl
|
||||
<< "\ttype:" << blob->data.interfaceData.dwType << Qt::endl
|
||||
<< "\tspeed:" << blob->data.interfaceData.dwSpeed << Qt::endl
|
||||
<< "\tadapter:" << blob->data.interfaceData.adapterName;
|
||||
break;
|
||||
case NLA_802_1X_LOCATION:
|
||||
qDebug() << "802.1x Location" << endl
|
||||
qDebug() << "802.1x Location" << Qt::endl
|
||||
<< '\t' << blob->data.locationData.information;
|
||||
break;
|
||||
case NLA_CONNECTIVITY:
|
||||
qDebug() << "Connectivity" << endl
|
||||
<< "\ttype:" << blob->data.connectivity.type << endl
|
||||
qDebug() << "Connectivity" << Qt::endl
|
||||
<< "\ttype:" << blob->data.connectivity.type << Qt::endl
|
||||
<< "\tinternet:" << blob->data.connectivity.internet;
|
||||
break;
|
||||
case NLA_ICS:
|
||||
qDebug() << "ICS" << endl
|
||||
<< "\tspeed:" << blob->data.ICS.remote.speed << endl
|
||||
<< "\ttype:" << blob->data.ICS.remote.type << endl
|
||||
<< "\tstate:" << blob->data.ICS.remote.state << endl
|
||||
<< "\tmachine name:" << blob->data.ICS.remote.machineName << endl
|
||||
qDebug() << "ICS" << Qt::endl
|
||||
<< "\tspeed:" << blob->data.ICS.remote.speed << Qt::endl
|
||||
<< "\ttype:" << blob->data.ICS.remote.type << Qt::endl
|
||||
<< "\tstate:" << blob->data.ICS.remote.state << Qt::endl
|
||||
<< "\tmachine name:" << blob->data.ICS.remote.machineName << Qt::endl
|
||||
<< "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
|
||||
break;
|
||||
default:
|
||||
|
@ -485,7 +485,7 @@ static jboolean startQtAndroidPlugin(JNIEnv *env, jobject /*object*/, jstring pa
|
||||
}
|
||||
|
||||
if (Q_UNLIKELY(!m_main)) {
|
||||
qCritical() << "dlsym failed:" << dlerror() << endl
|
||||
qCritical() << "dlsym failed:" << dlerror() << Qt::endl
|
||||
<< "Could not find main method";
|
||||
return false;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ NSString *macRole(QAccessibleInterface *interface)
|
||||
if (roleMap.isEmpty())
|
||||
populateRoleMap();
|
||||
|
||||
// MAC_ACCESSIBILTY_DEBUG() << "role for" << interface.object() << "interface role" << hex << qtRole;
|
||||
// MAC_ACCESSIBILTY_DEBUG() << "role for" << interface.object() << "interface role" << Qt::hex << qtRole;
|
||||
|
||||
if (roleMap.contains(qtRole)) {
|
||||
// MAC_ACCESSIBILTY_DEBUG() << "return" << roleMap[qtRole];
|
||||
|
@ -70,7 +70,7 @@ Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
if ([self handleGestureAsBeginEnd:event])
|
||||
return;
|
||||
|
||||
qCDebug(lcQpaGestures) << "magnifyWithEvent" << [event magnification] << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaGestures) << "magnifyWithEvent" << [event magnification] << "from device" << Qt::hex << [event deviceID];
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
QPointF windowPoint;
|
||||
QPointF screenPoint;
|
||||
@ -85,7 +85,7 @@ Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
return;
|
||||
|
||||
static bool zoomIn = true;
|
||||
qCDebug(lcQpaGestures) << "smartMagnifyWithEvent" << zoomIn << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaGestures) << "smartMagnifyWithEvent" << zoomIn << "from device" << Qt::hex << [event deviceID];
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
QPointF windowPoint;
|
||||
QPointF screenPoint;
|
||||
@ -116,7 +116,7 @@ Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
if (!m_platformWindow)
|
||||
return;
|
||||
|
||||
qCDebug(lcQpaGestures) << "swipeWithEvent" << [event deltaX] << [event deltaY] << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaGestures) << "swipeWithEvent" << [event deltaX] << [event deltaY] << "from device" << Qt::hex << [event deviceID];
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
QPointF windowPoint;
|
||||
QPointF screenPoint;
|
||||
@ -145,7 +145,7 @@ Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
QPointF windowPoint;
|
||||
QPointF screenPoint;
|
||||
[self convertFromScreen:[self screenMousePoint:event] toWindowPoint:&windowPoint andScreenPoint:&screenPoint];
|
||||
qCDebug(lcQpaGestures) << "beginGestureWithEvent @" << windowPoint << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaGestures) << "beginGestureWithEvent @" << windowPoint << "from device" << Qt::hex << [event deviceID];
|
||||
QWindowSystemInterface::handleGestureEvent(m_platformWindow->window(), QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), timestamp, Qt::BeginNativeGesture,
|
||||
windowPoint, screenPoint);
|
||||
}
|
||||
@ -155,7 +155,7 @@ Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
if (!m_platformWindow)
|
||||
return;
|
||||
|
||||
qCDebug(lcQpaGestures) << "endGestureWithEvent" << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaGestures) << "endGestureWithEvent" << "from device" << Qt::hex << [event deviceID];
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
QPointF windowPoint;
|
||||
QPointF screenPoint;
|
||||
|
@ -60,7 +60,7 @@ Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
|
||||
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
|
||||
qCDebug(lcQpaTouch) << "touchesBeganWithEvent" << points << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaTouch) << "touchesBeganWithEvent" << points << "from device" << Qt::hex << [event deviceID];
|
||||
QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
|
||||
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
|
||||
qCDebug(lcQpaTouch) << "touchesMovedWithEvent" << points << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaTouch) << "touchesMovedWithEvent" << points << "from device" << Qt::hex << [event deviceID];
|
||||
QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
|
||||
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
|
||||
qCDebug(lcQpaTouch) << "touchesEndedWithEvent" << points << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaTouch) << "touchesEndedWithEvent" << points << "from device" << Qt::hex << [event deviceID];
|
||||
QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
|
||||
|
||||
const NSTimeInterval timestamp = [event timestamp];
|
||||
const QList<QWindowSystemInterface::TouchPoint> points = QCocoaTouch::getCurrentTouchPointList(event, [self shouldSendSingleTouch]);
|
||||
qCDebug(lcQpaTouch) << "touchesCancelledWithEvent" << points << "from device" << hex << [event deviceID];
|
||||
qCDebug(lcQpaTouch) << "touchesCancelledWithEvent" << points << "from device" << Qt::hex << [event deviceID];
|
||||
QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, QCocoaTouch::getTouchDevice(QTouchDevice::TouchPad, [event deviceID]), points);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ gbm_surface *QEglFSKmsGbmScreen::createSurface(EGLConfig eglConfig)
|
||||
const auto gbmDevice = static_cast<QEglFSKmsGbmDevice *>(device())->gbmDevice();
|
||||
EGLint native_format = -1;
|
||||
EGLBoolean success = eglGetConfigAttrib(display(), eglConfig, EGL_NATIVE_VISUAL_ID, &native_format);
|
||||
qCDebug(qLcEglfsKmsDebug) << "Got native format" << hex << native_format << dec << "from eglGetConfigAttrib() with return code" << bool(success);
|
||||
qCDebug(qLcEglfsKmsDebug) << "Got native format" << Qt::hex << native_format << Qt::dec << "from eglGetConfigAttrib() with return code" << bool(success);
|
||||
|
||||
if (success)
|
||||
m_gbm_surface = gbm_surface_create(gbmDevice,
|
||||
|
@ -590,7 +590,7 @@ QString QWindowsContext::registerWindowClass(QString cname,
|
||||
|
||||
d->m_registeredWindowClassNames.insert(cname);
|
||||
qCDebug(lcQpaWindows).nospace() << __FUNCTION__ << ' ' << cname
|
||||
<< " style=0x" << hex << style << dec
|
||||
<< " style=0x" << Qt::hex << style << Qt::dec
|
||||
<< " brush=" << brush << " icon=" << icon << " atom=" << atom;
|
||||
return cname;
|
||||
}
|
||||
@ -1570,7 +1570,7 @@ extern "C" LRESULT QT_WIN_CALLBACK qWindowsWndProc(HWND hwnd, UINT message, WPAR
|
||||
if (QWindowsContext::verbose > 1 && lcQpaEvents().isDebugEnabled()) {
|
||||
if (const char *eventName = QWindowsGuiEventDispatcher::windowsMessageName(message)) {
|
||||
qCDebug(lcQpaEvents).nospace() << "EVENT: hwd=" << hwnd << ' ' << eventName
|
||||
<< " msg=0x" << hex << message << " et=0x" << et << dec << " wp="
|
||||
<< " msg=0x" << Qt::hex << message << " et=0x" << et << Qt::dec << " wp="
|
||||
<< int(wParam) << " at " << GET_X_LPARAM(lParam) << ','
|
||||
<< GET_Y_LPARAM(lParam) << " handled=" << handled;
|
||||
}
|
||||
|
@ -736,7 +736,7 @@ QString QWindowsShellItem::libraryItemDefaultSaveFolder(IShellItem *item)
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
void QWindowsShellItem::format(QDebug &d) const
|
||||
{
|
||||
d << "attributes=0x" << hex << attributes() << dec;
|
||||
d << "attributes=0x" << Qt::hex << attributes() << Qt::dec;
|
||||
if (isFileSystem())
|
||||
d << " [filesys]";
|
||||
if (isDir())
|
||||
@ -972,7 +972,7 @@ void QWindowsNativeFileDialogBase::doExec(HWND owner)
|
||||
// gets a WM_CLOSE or the parent window is destroyed.
|
||||
const HRESULT hr = m_fileDialog->Show(owner);
|
||||
QWindowsDialogs::eatMouseMove();
|
||||
qCDebug(lcQpaDialogs) << '<' << __FUNCTION__ << " returns " << hex << hr;
|
||||
qCDebug(lcQpaDialogs) << '<' << __FUNCTION__ << " returns " << Qt::hex << hr;
|
||||
// Emit accepted() only if there is a result as otherwise UI hangs occur.
|
||||
// For example, typing in invalid URLs results in empty result lists.
|
||||
if (hr == S_OK && !m_data.selectedFiles().isEmpty()) {
|
||||
@ -1013,7 +1013,7 @@ void QWindowsNativeFileDialogBase::setMode(QFileDialogOptions::FileMode mode,
|
||||
}
|
||||
qCDebug(lcQpaDialogs) << __FUNCTION__ << "mode=" << mode
|
||||
<< "acceptMode=" << acceptMode << "options=" << options
|
||||
<< "results in" << showbase << hex << flags;
|
||||
<< "results in" << Qt::showbase << Qt::hex << flags;
|
||||
|
||||
if (FAILED(m_fileDialog->SetOptions(flags)))
|
||||
qErrnoWarning("%s: SetOptions() failed", __FUNCTION__);
|
||||
|
@ -428,7 +428,7 @@ QWindowsOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
|
||||
if (QWindowsContext::verbose > 1 || result != S_OK) {
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << "fEscapePressed=" << fEscapePressed
|
||||
<< "grfKeyState=" << grfKeyState << "buttons" << m_currentButtons
|
||||
<< "returns 0x" << hex << int(result) << dec;
|
||||
<< "returns 0x" << Qt::hex << int(result) << Qt::dec;
|
||||
}
|
||||
return ResultFromScode(result);
|
||||
}
|
||||
@ -710,7 +710,7 @@ Qt::DropAction QWindowsDrag::drag(QDrag *drag)
|
||||
const Qt::DropActions possibleActions = drag->supportedActions();
|
||||
const DWORD allowedEffects = translateToWinDragEffects(possibleActions);
|
||||
qCDebug(lcQpaMime) << '>' << __FUNCTION__ << "possible Actions=0x"
|
||||
<< hex << int(possibleActions) << "effects=0x" << allowedEffects << dec;
|
||||
<< Qt::hex << int(possibleActions) << "effects=0x" << allowedEffects << Qt::dec;
|
||||
// Indicate message handlers we are in DoDragDrop() event loop.
|
||||
QWindowsDrag::m_dragging = true;
|
||||
const HRESULT r = DoDragDrop(dropDataObject, windowDropSource, allowedEffects, &resultEffect);
|
||||
@ -734,9 +734,9 @@ Qt::DropAction QWindowsDrag::drag(QDrag *drag)
|
||||
dropDataObject->releaseQt();
|
||||
dropDataObject->Release(); // Will delete obj if refcount becomes 0
|
||||
windowDropSource->Release(); // Will delete src if refcount becomes 0
|
||||
qCDebug(lcQpaMime) << '<' << __FUNCTION__ << hex << "allowedEffects=0x" << allowedEffects
|
||||
qCDebug(lcQpaMime) << '<' << __FUNCTION__ << Qt::hex << "allowedEffects=0x" << allowedEffects
|
||||
<< "reportedPerformedEffect=0x" << reportedPerformedEffect
|
||||
<< " resultEffect=0x" << resultEffect << "hr=0x" << int(r) << dec << "dropAction=" << dragResult;
|
||||
<< " resultEffect=0x" << resultEffect << "hr=0x" << int(r) << Qt::dec << "dropAction=" << dragResult;
|
||||
return dragResult;
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ QDebug operator<<(QDebug d, const PIXELFORMATDESCRIPTOR &pd)
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << "PIXELFORMATDESCRIPTOR "
|
||||
<< "dwFlags=" << hex << showbase << pd.dwFlags << dec << noshowbase;
|
||||
<< "dwFlags=" << Qt::hex << Qt::showbase << pd.dwFlags << Qt::dec << Qt::noshowbase;
|
||||
if (pd.dwFlags & PFD_DRAW_TO_WINDOW) d << " PFD_DRAW_TO_WINDOW";
|
||||
if (pd.dwFlags & PFD_DRAW_TO_BITMAP) d << " PFD_DRAW_TO_BITMAP";
|
||||
if (pd.dwFlags & PFD_SUPPORT_GDI) d << " PFD_SUPPORT_GDI";
|
||||
@ -631,10 +631,10 @@ static int choosePixelFormat(HDC hdc,
|
||||
nsp << __FUNCTION__;
|
||||
if (sampleBuffersRequested)
|
||||
nsp << " samples=" << iAttributes[samplesValuePosition];
|
||||
nsp << " Attributes: " << hex << showbase;
|
||||
nsp << " Attributes: " << Qt::hex << Qt::showbase;
|
||||
for (int ii = 0; ii < i; ++ii)
|
||||
nsp << iAttributes[ii] << ',';
|
||||
nsp << noshowbase << dec << "\n obtained px #" << pixelFormat
|
||||
nsp << Qt::noshowbase << Qt::dec << "\n obtained px #" << pixelFormat
|
||||
<< " of " << numFormats << "\n " << *obtainedPfd;
|
||||
qCDebug(lcQpaGl) << message;
|
||||
} // Debug
|
||||
@ -784,7 +784,7 @@ static HGLRC createContext(const QOpenGLStaticContext &staticContext,
|
||||
if (!result) {
|
||||
QString message;
|
||||
QDebug(&message).nospace() << __FUNCTION__ << ": wglCreateContextAttribsARB() failed (GL error code: 0x"
|
||||
<< hex << staticContext.opengl32.glGetError() << dec << ") for format: " << format << ", shared context: " << shared;
|
||||
<< Qt::hex << staticContext.opengl32.glGetError() << Qt::dec << ") for format: " << format << ", shared context: " << shared;
|
||||
qErrnoWarning("%s", qPrintable(message));
|
||||
}
|
||||
return result;
|
||||
|
@ -657,9 +657,9 @@ void QWindowsInputContext::handleInputLanguageChanged(WPARAM wparam, LPARAM lpar
|
||||
m_locale = qt_localeFromLCID(m_languageId);
|
||||
emitLocaleChanged();
|
||||
|
||||
qCDebug(lcQpaInputMethods) << __FUNCTION__ << hex << showbase
|
||||
qCDebug(lcQpaInputMethods) << __FUNCTION__ << Qt::hex << Qt::showbase
|
||||
<< oldLanguageId << "->" << newLanguageId << "Character set:"
|
||||
<< DWORD(wparam) << dec << noshowbase << m_locale;
|
||||
<< DWORD(wparam) << Qt::dec << Qt::noshowbase << m_locale;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -324,7 +324,7 @@ QPlatformWindow *QWindowsIntegration::createPlatformWindow(QWindow *window) cons
|
||||
if (window->type() == Qt::Desktop) {
|
||||
QWindowsDesktopWindow *result = new QWindowsDesktopWindow(window);
|
||||
qCDebug(lcQpaWindows) << "Desktop window:" << window
|
||||
<< showbase << hex << result->winId() << noshowbase << dec << result->geometry();
|
||||
<< Qt::showbase << Qt::hex << result->winId() << Qt::noshowbase << Qt::dec << result->geometry();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -373,8 +373,8 @@ QPlatformWindow *QWindowsIntegration::createForeignWindow(QWindow *window, WId n
|
||||
screen = pScreen->screen();
|
||||
if (screen && screen != window->screen())
|
||||
window->setScreen(screen);
|
||||
qCDebug(lcQpaWindows) << "Foreign window:" << window << showbase << hex
|
||||
<< result->winId() << noshowbase << dec << obtainedGeometry << screen;
|
||||
qCDebug(lcQpaWindows) << "Foreign window:" << window << Qt::showbase << Qt::hex
|
||||
<< result->winId() << Qt::noshowbase << Qt::dec << obtainedGeometry << screen;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -554,7 +554,7 @@ QDebug operator<<(QDebug d, const KeyboardLayoutItem &k)
|
||||
if (const quint32 qtKey = k.qtKey[i]) {
|
||||
d << '[' << i << ' ';
|
||||
QtDebugUtils::formatQFlags(d, ModsTbl[i]);
|
||||
d << ' ' << hex << showbase << qtKey << dec << noshowbase << ' ';
|
||||
d << ' ' << Qt::hex << Qt::showbase << qtKey << Qt::dec << Qt::noshowbase << ' ';
|
||||
QtDebugUtils::formatQEnum(d, Qt::Key(qtKey));
|
||||
if (qtKey >= 32 && qtKey < 128)
|
||||
d << " '" << char(qtKey) << '\'';
|
||||
@ -776,7 +776,7 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
|
||||
::ToAscii(vk_key, scancode, kbdBuffer, reinterpret_cast<LPWORD>(&buffer), 0);
|
||||
}
|
||||
qCDebug(lcQpaEvents) << __FUNCTION__ << "for virtual key="
|
||||
<< hex << showbase << vk_key << dec << noshowbase << keyLayout[vk_key];
|
||||
<< Qt::hex << Qt::showbase << vk_key << Qt::dec << Qt::noshowbase << keyLayout[vk_key];
|
||||
}
|
||||
|
||||
static inline QString messageKeyText(const MSG &msg)
|
||||
@ -1384,7 +1384,7 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
|
||||
}
|
||||
}
|
||||
qCDebug(lcQpaEvents) << __FUNCTION__ << e << "nativeVirtualKey="
|
||||
<< showbase << hex << e->nativeVirtualKey() << dec << noshowbase
|
||||
<< Qt::showbase << Qt::hex << e->nativeVirtualKey() << Qt::dec << Qt::noshowbase
|
||||
<< e->modifiers() << kbItem << "\n returns" << formatKeys(result);
|
||||
return result;
|
||||
}
|
||||
|
@ -896,8 +896,8 @@ void QWindowsMenuItem::formatDebug(QDebug &d) const
|
||||
d << ", parentMenu=" << static_cast<const void *>(m_parentMenu);
|
||||
if (m_subMenu)
|
||||
d << ", subMenu=" << static_cast<const void *>(m_subMenu);
|
||||
d << ", tag=" << showbase << hex
|
||||
<< tag() << noshowbase << dec << ", id=" << m_id;
|
||||
d << ", tag=" << Qt::showbase << Qt::hex
|
||||
<< tag() << Qt::noshowbase << Qt::dec << ", id=" << m_id;
|
||||
#if QT_CONFIG(shortcut)
|
||||
if (!m_shortcut.isEmpty())
|
||||
d << ", shortcut=" << m_shortcut;
|
||||
@ -933,7 +933,7 @@ void QWindowsMenu::formatDebug(QDebug &d) const
|
||||
if (m_parentMenu != nullptr)
|
||||
d << " [on menu]";
|
||||
if (tag())
|
||||
d << ", tag=" << showbase << hex << tag() << noshowbase << dec;
|
||||
d << ", tag=" << Qt::showbase << Qt::hex << tag() << Qt::noshowbase << Qt::dec;
|
||||
if (m_visible)
|
||||
d << " [visible]";
|
||||
if (m_enabled)
|
||||
|
@ -124,8 +124,8 @@ static inline QTouchDevice *createTouchDevice()
|
||||
return nullptr;
|
||||
const int tabletPc = GetSystemMetrics(SM_TABLETPC);
|
||||
const int maxTouchPoints = GetSystemMetrics(SM_MAXIMUMTOUCHES);
|
||||
qCDebug(lcQpaEvents) << "Digitizers:" << hex << showbase << (digitizers & ~NID_READY)
|
||||
<< "Ready:" << (digitizers & NID_READY) << dec << noshowbase
|
||||
qCDebug(lcQpaEvents) << "Digitizers:" << Qt::hex << Qt::showbase << (digitizers & ~NID_READY)
|
||||
<< "Ready:" << (digitizers & NID_READY) << Qt::dec << Qt::noshowbase
|
||||
<< "Tablet PC:" << tabletPc << "Max touch points:" << maxTouchPoints;
|
||||
QTouchDevice *result = new QTouchDevice;
|
||||
result->setType(digitizers & NID_INTEGRATED_TOUCH
|
||||
|
@ -110,7 +110,7 @@ QWindowsOleDataObject::GetData(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium)
|
||||
}
|
||||
|
||||
if (QWindowsContext::verbose > 1 && lcQpaMime().isDebugEnabled())
|
||||
qCDebug(lcQpaMime) <<__FUNCTION__ << *pformatetc << "returns" << hex << showbase << quint64(hr);
|
||||
qCDebug(lcQpaMime) <<__FUNCTION__ << *pformatetc << "returns" << Qt::hex << Qt::showbase << quint64(hr);
|
||||
|
||||
return hr;
|
||||
}
|
||||
@ -135,7 +135,7 @@ QWindowsOleDataObject::QueryGetData(LPFORMATETC pformatetc)
|
||||
ResultFromScode(S_OK) : ResultFromScode(S_FALSE);
|
||||
}
|
||||
if (QWindowsContext::verbose > 1)
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << " returns 0x" << hex << int(hr);
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << " returns 0x" << Qt::hex << int(hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ QWindowsOleDataObject::SetData(LPFORMATETC pFormatetc, STGMEDIUM *pMedium, BOOL
|
||||
hr = ResultFromScode(S_OK);
|
||||
}
|
||||
if (QWindowsContext::verbose > 1)
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << " returns 0x" << hex << int(hr);
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << " returns 0x" << Qt::hex << int(hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -188,9 +188,9 @@ QDebug operator<<(QDebug d, const GpuDescription &gd)
|
||||
{
|
||||
QDebugStateSaver s(d);
|
||||
d.nospace();
|
||||
d << hex << showbase << "GpuDescription(vendorId=" << gd.vendorId
|
||||
d << Qt::hex << Qt::showbase << "GpuDescription(vendorId=" << gd.vendorId
|
||||
<< ", deviceId=" << gd.deviceId << ", subSysId=" << gd.subSysId
|
||||
<< dec << noshowbase << ", revision=" << gd.revision
|
||||
<< Qt::dec << Qt::noshowbase << ", revision=" << gd.revision
|
||||
<< ", driver: " << gd.driverName
|
||||
<< ", version=" << gd.driverVersion << ", " << gd.description
|
||||
<< gd.gpuSuitableScreen << ')';
|
||||
@ -207,11 +207,11 @@ QString GpuDescription::toString() const
|
||||
<< "\n Driver Name : " << driverName
|
||||
<< "\n Driver Version : " << driverVersion.toString()
|
||||
<< "\n Vendor ID : 0x" << qSetPadChar(QLatin1Char('0'))
|
||||
<< uppercasedigits << hex << qSetFieldWidth(4) << vendorId
|
||||
<< Qt::uppercasedigits << Qt::hex << qSetFieldWidth(4) << vendorId
|
||||
<< "\n Device ID : 0x" << qSetFieldWidth(4) << deviceId
|
||||
<< "\n SubSys ID : 0x" << qSetFieldWidth(8) << subSysId
|
||||
<< "\n Revision ID : 0x" << qSetFieldWidth(4) << revision
|
||||
<< dec;
|
||||
<< Qt::dec;
|
||||
if (!gpuSuitableScreen.isEmpty())
|
||||
str << "\nGL windows forced to screen: " << gpuSuitableScreen;
|
||||
return result;
|
||||
|
@ -315,8 +315,8 @@ static QTouchDevice *createTouchDevice()
|
||||
return nullptr;
|
||||
const int tabletPc = GetSystemMetrics(SM_TABLETPC);
|
||||
const int maxTouchPoints = GetSystemMetrics(SM_MAXIMUMTOUCHES);
|
||||
qCDebug(lcQpaEvents) << "Digitizers:" << hex << showbase << (digitizers & ~NID_READY)
|
||||
<< "Ready:" << (digitizers & NID_READY) << dec << noshowbase
|
||||
qCDebug(lcQpaEvents) << "Digitizers:" << Qt::hex << Qt::showbase << (digitizers & ~NID_READY)
|
||||
<< "Ready:" << (digitizers & NID_READY) << Qt::dec << Qt::noshowbase
|
||||
<< "Tablet PC:" << tabletPc << "Max touch points:" << maxTouchPoints;
|
||||
QTouchDevice *result = new QTouchDevice;
|
||||
result->setType(digitizers & NID_INTEGRATED_TOUCH
|
||||
@ -469,19 +469,19 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
|
||||
QList<QWindowSystemInterface::TouchPoint> touchPoints;
|
||||
|
||||
if (QWindowsContext::verbose > 1)
|
||||
qCDebug(lcQpaEvents).noquote().nospace() << showbase
|
||||
qCDebug(lcQpaEvents).noquote().nospace() << Qt::showbase
|
||||
<< __FUNCTION__
|
||||
<< " message=" << hex << msg.message
|
||||
<< " count=" << dec << count;
|
||||
<< " message=" << Qt::hex << msg.message
|
||||
<< " count=" << Qt::dec << count;
|
||||
|
||||
Qt::TouchPointStates allStates = 0;
|
||||
|
||||
for (quint32 i = 0; i < count; ++i) {
|
||||
if (QWindowsContext::verbose > 1)
|
||||
qCDebug(lcQpaEvents).noquote().nospace() << showbase
|
||||
qCDebug(lcQpaEvents).noquote().nospace() << Qt::showbase
|
||||
<< " TouchPoint id=" << touchInfo[i].pointerInfo.pointerId
|
||||
<< " frame=" << touchInfo[i].pointerInfo.frameId
|
||||
<< " flags=" << hex << touchInfo[i].pointerInfo.pointerFlags;
|
||||
<< " flags=" << Qt::hex << touchInfo[i].pointerInfo.pointerFlags;
|
||||
|
||||
QWindowSystemInterface::TouchPoint touchPoint;
|
||||
const quint32 pointerId = touchInfo[i].pointerInfo.pointerId;
|
||||
@ -563,11 +563,11 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
|
||||
const int z = 0;
|
||||
|
||||
if (QWindowsContext::verbose > 1)
|
||||
qCDebug(lcQpaEvents).noquote().nospace() << showbase
|
||||
qCDebug(lcQpaEvents).noquote().nospace() << Qt::showbase
|
||||
<< __FUNCTION__ << " sourceDevice=" << sourceDevice
|
||||
<< " globalPos=" << globalPos << " localPos=" << localPos << " hiResGlobalPos=" << hiResGlobalPos
|
||||
<< " message=" << hex << msg.message
|
||||
<< " flags=" << hex << penInfo->pointerInfo.pointerFlags;
|
||||
<< " message=" << Qt::hex << msg.message
|
||||
<< " flags=" << Qt::hex << penInfo->pointerInfo.pointerFlags;
|
||||
|
||||
const QTabletEvent::TabletDevice device = QTabletEvent::Stylus;
|
||||
QTabletEvent::PointerType type;
|
||||
|
@ -146,13 +146,13 @@ QDebug operator<<(QDebug d, const LOGCONTEXT &lc)
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << "LOGCONTEXT(\"" << QString::fromWCharArray(lc.lcName) << "\", options=0x"
|
||||
<< hex << lc.lcOptions << dec;
|
||||
<< Qt::hex << lc.lcOptions << Qt::dec;
|
||||
formatOptions(d, lc.lcOptions);
|
||||
d << ", status=0x" << hex << lc.lcStatus << ", device=0x" << lc.lcDevice
|
||||
<< dec << ", PktRate=" << lc.lcPktRate
|
||||
d << ", status=0x" << Qt::hex << lc.lcStatus << ", device=0x" << lc.lcDevice
|
||||
<< Qt::dec << ", PktRate=" << lc.lcPktRate
|
||||
<< ", PktData=" << lc.lcPktData << ", PktMode=" << lc.lcPktMode
|
||||
<< ", MoveMask=0x" << hex << lc.lcMoveMask << ", BtnDnMask=0x" << lc.lcBtnDnMask
|
||||
<< ", BtnUpMask=0x" << lc.lcBtnUpMask << dec << ", SysMode=" << lc.lcSysMode
|
||||
<< ", MoveMask=0x" << Qt::hex << lc.lcMoveMask << ", BtnDnMask=0x" << lc.lcBtnDnMask
|
||||
<< ", BtnUpMask=0x" << lc.lcBtnUpMask << Qt::dec << ", SysMode=" << lc.lcSysMode
|
||||
<< ", InOrg=(" << lc.lcInOrgX << ", " << lc.lcInOrgY << ", " << lc.lcInOrgZ
|
||||
<< "), InExt=(" << lc.lcInExtX << ", " << lc.lcInExtY << ", " << lc.lcInExtZ
|
||||
<< ") OutOrg=(" << lc.lcOutOrgX << ", " << lc.lcOutOrgY << ", "
|
||||
@ -305,7 +305,7 @@ QString QWindowsTabletSupport::description() const
|
||||
<< '.' << (specificationVersion & 0xFF) << " implementation: v"
|
||||
<< (implementationVersion >> 8) << '.' << (implementationVersion & 0xFF)
|
||||
<< ' ' << devices << " device(s), " << cursors << " cursor(s), "
|
||||
<< extensions << " extensions" << ", options: 0x" << hex << opts << dec;
|
||||
<< extensions << " extensions" << ", options: 0x" << Qt::hex << opts << Qt::dec;
|
||||
formatOptions(str, opts);
|
||||
if (m_tiltSupport)
|
||||
str << " tilt";
|
||||
|
@ -238,7 +238,7 @@ QDebug operator<<(QDebug d, const WINDOWPLACEMENT &wp)
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d.noquote();
|
||||
d << "WINDOWPLACEMENT(flags=0x" << hex << wp.flags << dec << ", showCmd="
|
||||
d << "WINDOWPLACEMENT(flags=0x" << Qt::hex << wp.flags << Qt::dec << ", showCmd="
|
||||
<< wp.showCmd << ", ptMinPosition=" << wp.ptMinPosition << ", ptMaxPosition=" << wp.ptMaxPosition
|
||||
<< ", rcNormalPosition=" << wp.rcNormalPosition;
|
||||
return d;
|
||||
@ -248,7 +248,7 @@ QDebug operator<<(QDebug d, const GUID &guid)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << '{' << hex << uppercasedigits << qSetPadChar(QLatin1Char('0'))
|
||||
d << '{' << Qt::hex << Qt::uppercasedigits << qSetPadChar(QLatin1Char('0'))
|
||||
<< qSetFieldWidth(8) << guid.Data1
|
||||
<< qSetFieldWidth(0) << '-' << qSetFieldWidth(4)
|
||||
<< guid.Data2 << qSetFieldWidth(0) << '-' << qSetFieldWidth(4)
|
||||
@ -883,7 +883,7 @@ QMargins QWindowsGeometryHint::frame(DWORD style, DWORD exStyle)
|
||||
const QMargins result(qAbs(rect.left), qAbs(rect.top),
|
||||
qAbs(rect.right), qAbs(rect.bottom));
|
||||
qCDebug(lcQpaWindows).nospace() << __FUNCTION__ << " style="
|
||||
<< showbase << hex << style << " exStyle=" << exStyle << dec << noshowbase
|
||||
<< Qt::showbase << Qt::hex << style << " exStyle=" << exStyle << Qt::dec << Qt::noshowbase
|
||||
<< ' ' << rect << ' ' << result;
|
||||
return result;
|
||||
}
|
||||
|
@ -636,13 +636,13 @@ static void dumpNativeWindowsRecursion(const QXcbConnection *connection, xcb_win
|
||||
const QChar oldPadChar =str.padChar();
|
||||
str.setFieldWidth(8);
|
||||
str.setPadChar(QLatin1Char('0'));
|
||||
str << hex << window;
|
||||
str << Qt::hex << window;
|
||||
str.setFieldWidth(oldFieldWidth);
|
||||
str.setPadChar(oldPadChar);
|
||||
str << dec << " \""
|
||||
str << Qt::dec << " \""
|
||||
<< QXcbWindow::windowTitle(connection, window) << "\" "
|
||||
<< geom.width() << 'x' << geom.height() << forcesign << geom.x() << geom.y()
|
||||
<< noforcesign << '\n';
|
||||
<< geom.width() << 'x' << geom.height() << Qt::forcesign << geom.x() << geom.y()
|
||||
<< Qt::noforcesign << '\n';
|
||||
|
||||
auto reply = Q_XCB_REPLY(xcb_query_tree, conn, window);
|
||||
if (reply) {
|
||||
|
@ -915,7 +915,7 @@ QByteArray QXcbScreen::getEdid() const
|
||||
static inline void formatRect(QDebug &debug, const QRect r)
|
||||
{
|
||||
debug << r.width() << 'x' << r.height()
|
||||
<< forcesign << r.x() << r.y() << noforcesign;
|
||||
<< Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
|
||||
}
|
||||
|
||||
static inline void formatSizeF(QDebug &debug, const QSizeF s)
|
||||
@ -929,7 +929,7 @@ QDebug operator<<(QDebug debug, const QXcbScreen *screen)
|
||||
debug.nospace();
|
||||
debug << "QXcbScreen(" << (const void *)screen;
|
||||
if (screen) {
|
||||
debug << fixed << qSetRealNumberPrecision(1);
|
||||
debug << Qt::fixed << qSetRealNumberPrecision(1);
|
||||
debug << ", name=" << screen->name();
|
||||
debug << ", geometry=";
|
||||
formatRect(debug, screen->geometry());
|
||||
@ -947,7 +947,7 @@ QDebug operator<<(QDebug debug, const QXcbScreen *screen)
|
||||
debug << "), orientation=" << screen->orientation();
|
||||
debug << ", depth=" << screen->depth();
|
||||
debug << ", refreshRate=" << screen->refreshRate();
|
||||
debug << ", root=" << hex << screen->root();
|
||||
debug << ", root=" << Qt::hex << screen->root();
|
||||
debug << ", windowManagerName=" << screen->windowManagerName();
|
||||
}
|
||||
debug << ')';
|
||||
|
@ -213,7 +213,7 @@ void QSqlQuery_snippets()
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
cout << i.key().toUtf8().data() << ": "
|
||||
<< i.value().toString().toUtf8().data() << endl;
|
||||
<< i.value().toString().toUtf8().data() << Qt::endl;
|
||||
}
|
||||
//! [14]
|
||||
}
|
||||
@ -223,7 +223,7 @@ void QSqlQuery_snippets()
|
||||
//! [15]
|
||||
QList<QVariant> list = query.boundValues().values();
|
||||
for (int i = 0; i < list.size(); ++i)
|
||||
cout << i << ": " << list.at(i).toString().toUtf8().data() << endl;
|
||||
cout << i << ": " << list.at(i).toString().toUtf8().data() << Qt::endl;
|
||||
//! [15]
|
||||
}
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ QDebug operator<<(QDebug dbg, const QSqlRecord &r)
|
||||
dbg << "QSqlRecord(" << count << ')';
|
||||
for (int i = 0; i < count; ++i) {
|
||||
dbg.nospace();
|
||||
dbg << '\n' << qSetFieldWidth(2) << right << i << left << qSetFieldWidth(0) << ':';
|
||||
dbg << '\n' << qSetFieldWidth(2) << Qt::right << i << Qt::left << qSetFieldWidth(0) << ':';
|
||||
dbg.space();
|
||||
dbg << r.field(i) << r.value(i).toString();
|
||||
}
|
||||
|
@ -161,22 +161,22 @@ static QString moc(const QString &name)
|
||||
|
||||
static QTextStream &writeHeader(QTextStream &ts, bool changesWillBeLost)
|
||||
{
|
||||
ts << "/*" << endl
|
||||
<< " * This file was generated by " PROGRAMNAME " version " PROGRAMVERSION << endl
|
||||
<< " * Command line was: " << commandLine << endl
|
||||
<< " *" << endl
|
||||
<< " * " PROGRAMNAME " is " PROGRAMCOPYRIGHT << endl
|
||||
<< " *" << endl
|
||||
<< " * This is an auto-generated file." << endl;
|
||||
ts << "/*" << Qt::endl
|
||||
<< " * This file was generated by " PROGRAMNAME " version " PROGRAMVERSION << Qt::endl
|
||||
<< " * Command line was: " << commandLine << Qt::endl
|
||||
<< " *" << Qt::endl
|
||||
<< " * " PROGRAMNAME " is " PROGRAMCOPYRIGHT << Qt::endl
|
||||
<< " *" << Qt::endl
|
||||
<< " * This is an auto-generated file." << Qt::endl;
|
||||
|
||||
if (changesWillBeLost)
|
||||
ts << " * Do not edit! All changes made to it will be lost." << endl;
|
||||
ts << " * Do not edit! All changes made to it will be lost." << Qt::endl;
|
||||
else
|
||||
ts << " * This file may have been hand-edited. Look for HAND-EDIT comments" << endl
|
||||
<< " * before re-generating it." << endl;
|
||||
ts << " * This file may have been hand-edited. Look for HAND-EDIT comments" << Qt::endl
|
||||
<< " * before re-generating it." << Qt::endl;
|
||||
|
||||
ts << " */" << endl
|
||||
<< endl;
|
||||
ts << " */" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
return ts;
|
||||
}
|
||||
@ -466,66 +466,66 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
}
|
||||
includeGuard = QString(QLatin1String("%1"))
|
||||
.arg(includeGuard);
|
||||
hs << "#ifndef " << includeGuard << endl
|
||||
<< "#define " << includeGuard << endl
|
||||
<< endl;
|
||||
hs << "#ifndef " << includeGuard << Qt::endl
|
||||
<< "#define " << includeGuard << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// include our stuff:
|
||||
hs << "#include <QtCore/QObject>" << endl
|
||||
hs << "#include <QtCore/QObject>" << Qt::endl
|
||||
<< includeList
|
||||
<< "#include <QtDBus/QtDBus>" << endl;
|
||||
<< "#include <QtDBus/QtDBus>" << Qt::endl;
|
||||
|
||||
for (const QString &include : qAsConst(includes)) {
|
||||
hs << "#include \"" << include << "\"" << endl;
|
||||
hs << "#include \"" << include << "\"" << Qt::endl;
|
||||
if (headerName.isEmpty())
|
||||
cs << "#include \"" << include << "\"" << endl;
|
||||
cs << "#include \"" << include << "\"" << Qt::endl;
|
||||
}
|
||||
|
||||
hs << endl;
|
||||
hs << Qt::endl;
|
||||
|
||||
if (cppName != headerName) {
|
||||
if (!headerName.isEmpty() && headerName != QLatin1String("-"))
|
||||
cs << "#include \"" << headerName << "\"" << endl << endl;
|
||||
cs << "#include \"" << headerName << "\"" << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
for (const QDBusIntrospection::Interface *interface : interfaces) {
|
||||
QString className = classNameForInterface(interface->name, Proxy);
|
||||
|
||||
// comment:
|
||||
hs << "/*" << endl
|
||||
<< " * Proxy class for interface " << interface->name << endl
|
||||
<< " */" << endl;
|
||||
cs << "/*" << endl
|
||||
<< " * Implementation of interface class " << className << endl
|
||||
<< " */" << endl
|
||||
<< endl;
|
||||
hs << "/*" << Qt::endl
|
||||
<< " * Proxy class for interface " << interface->name << Qt::endl
|
||||
<< " */" << Qt::endl;
|
||||
cs << "/*" << Qt::endl
|
||||
<< " * Implementation of interface class " << className << Qt::endl
|
||||
<< " */" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// class header:
|
||||
hs << "class " << className << ": public QDBusAbstractInterface" << endl
|
||||
<< "{" << endl
|
||||
<< " Q_OBJECT" << endl;
|
||||
hs << "class " << className << ": public QDBusAbstractInterface" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " Q_OBJECT" << Qt::endl;
|
||||
|
||||
// the interface name
|
||||
hs << "public:" << endl
|
||||
<< " static inline const char *staticInterfaceName()" << endl
|
||||
<< " { return \"" << interface->name << "\"; }" << endl
|
||||
<< endl;
|
||||
hs << "public:" << Qt::endl
|
||||
<< " static inline const char *staticInterfaceName()" << Qt::endl
|
||||
<< " { return \"" << interface->name << "\"; }" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// constructors/destructors:
|
||||
hs << "public:" << endl
|
||||
<< " " << className << "(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);" << endl
|
||||
<< endl
|
||||
<< " ~" << className << "();" << endl
|
||||
<< endl;
|
||||
cs << className << "::" << className << "(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)" << endl
|
||||
<< " : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)" << endl
|
||||
<< "{" << endl
|
||||
<< "}" << endl
|
||||
<< endl
|
||||
<< className << "::~" << className << "()" << endl
|
||||
<< "{" << endl
|
||||
<< "}" << endl
|
||||
<< endl;
|
||||
hs << "public:" << Qt::endl
|
||||
<< " " << className << "(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " ~" << className << "();" << Qt::endl
|
||||
<< Qt::endl;
|
||||
cs << className << "::" << className << "(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)" << Qt::endl
|
||||
<< " : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< "}" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< className << "::~" << className << "()" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< "}" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// properties:
|
||||
for (const QDBusIntrospection::Property &property : interface->properties) {
|
||||
@ -545,27 +545,27 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
// it's writeable
|
||||
hs << " WRITE " << setter;
|
||||
|
||||
hs << ")" << endl;
|
||||
hs << ")" << Qt::endl;
|
||||
|
||||
// getter:
|
||||
if (property.access != QDBusIntrospection::Property::Write) {
|
||||
hs << " inline " << type << " " << getter << "() const" << endl
|
||||
hs << " inline " << type << " " << getter << "() const" << Qt::endl
|
||||
<< " { return qvariant_cast< " << type << " >(property(\""
|
||||
<< property.name << "\")); }" << endl;
|
||||
<< property.name << "\")); }" << Qt::endl;
|
||||
}
|
||||
|
||||
// setter:
|
||||
if (property.access != QDBusIntrospection::Property::Read) {
|
||||
hs << " inline void " << setter << "(" << constRefArg(type) << "value)" << endl
|
||||
hs << " inline void " << setter << "(" << constRefArg(type) << "value)" << Qt::endl
|
||||
<< " { setProperty(\"" << property.name
|
||||
<< "\", QVariant::fromValue(value)); }" << endl;
|
||||
<< "\", QVariant::fromValue(value)); }" << Qt::endl;
|
||||
}
|
||||
|
||||
hs << endl;
|
||||
hs << Qt::endl;
|
||||
}
|
||||
|
||||
// methods:
|
||||
hs << "public Q_SLOTS: // METHODS" << endl;
|
||||
hs << "public Q_SLOTS: // METHODS" << Qt::endl;
|
||||
for (const QDBusIntrospection::Method &method : interface->methods) {
|
||||
bool isDeprecated = method.annotations.value(QLatin1String("org.freedesktop.DBus.Deprecated")) == QLatin1String("true");
|
||||
bool isNoReply =
|
||||
@ -595,26 +595,26 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
QStringList argNames = makeArgNames(method.inputArgs);
|
||||
writeArgList(hs, argNames, method.annotations, method.inputArgs);
|
||||
|
||||
hs << ")" << endl
|
||||
<< " {" << endl
|
||||
<< " QList<QVariant> argumentList;" << endl;
|
||||
hs << ")" << Qt::endl
|
||||
<< " {" << Qt::endl
|
||||
<< " QList<QVariant> argumentList;" << Qt::endl;
|
||||
|
||||
if (!method.inputArgs.isEmpty()) {
|
||||
hs << " argumentList";
|
||||
for (int argPos = 0; argPos < method.inputArgs.count(); ++argPos)
|
||||
hs << " << QVariant::fromValue(" << argNames.at(argPos) << ')';
|
||||
hs << ";" << endl;
|
||||
hs << ";" << Qt::endl;
|
||||
}
|
||||
|
||||
if (isNoReply)
|
||||
hs << " callWithArgumentList(QDBus::NoBlock, "
|
||||
<< "QStringLiteral(\"" << method.name << "\"), argumentList);" << endl;
|
||||
<< "QStringLiteral(\"" << method.name << "\"), argumentList);" << Qt::endl;
|
||||
else
|
||||
hs << " return asyncCallWithArgumentList(QStringLiteral(\""
|
||||
<< method.name << "\"), argumentList);" << endl;
|
||||
<< method.name << "\"), argumentList);" << Qt::endl;
|
||||
|
||||
// close the function:
|
||||
hs << " }" << endl;
|
||||
hs << " }" << Qt::endl;
|
||||
|
||||
if (method.outputArgs.count() > 1) {
|
||||
// generate the old-form QDBusReply methods with multiple incoming parameters
|
||||
@ -627,39 +627,39 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
QStringList argNames = makeArgNames(method.inputArgs, method.outputArgs);
|
||||
writeArgList(hs, argNames, method.annotations, method.inputArgs, method.outputArgs);
|
||||
|
||||
hs << ")" << endl
|
||||
<< " {" << endl
|
||||
<< " QList<QVariant> argumentList;" << endl;
|
||||
hs << ")" << Qt::endl
|
||||
<< " {" << Qt::endl
|
||||
<< " QList<QVariant> argumentList;" << Qt::endl;
|
||||
|
||||
int argPos = 0;
|
||||
if (!method.inputArgs.isEmpty()) {
|
||||
hs << " argumentList";
|
||||
for (argPos = 0; argPos < method.inputArgs.count(); ++argPos)
|
||||
hs << " << QVariant::fromValue(" << argNames.at(argPos) << ')';
|
||||
hs << ";" << endl;
|
||||
hs << ";" << Qt::endl;
|
||||
}
|
||||
|
||||
hs << " QDBusMessage reply = callWithArgumentList(QDBus::Block, "
|
||||
<< "QStringLiteral(\"" << method.name << "\"), argumentList);" << endl;
|
||||
<< "QStringLiteral(\"" << method.name << "\"), argumentList);" << Qt::endl;
|
||||
|
||||
argPos++;
|
||||
hs << " if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == "
|
||||
<< method.outputArgs.count() << ") {" << endl;
|
||||
<< method.outputArgs.count() << ") {" << Qt::endl;
|
||||
|
||||
// yes, starting from 1
|
||||
for (int i = 1; i < method.outputArgs.count(); ++i)
|
||||
hs << " " << argNames.at(argPos++) << " = qdbus_cast<"
|
||||
<< templateArg(qtTypeName(method.outputArgs.at(i).type, method.annotations, i, "Out"))
|
||||
<< ">(reply.arguments().at(" << i << "));" << endl;
|
||||
hs << " }" << endl
|
||||
<< " return reply;" << endl
|
||||
<< " }" << endl;
|
||||
<< ">(reply.arguments().at(" << i << "));" << Qt::endl;
|
||||
hs << " }" << Qt::endl
|
||||
<< " return reply;" << Qt::endl
|
||||
<< " }" << Qt::endl;
|
||||
}
|
||||
|
||||
hs << endl;
|
||||
hs << Qt::endl;
|
||||
}
|
||||
|
||||
hs << "Q_SIGNALS: // SIGNALS" << endl;
|
||||
hs << "Q_SIGNALS: // SIGNALS" << Qt::endl;
|
||||
for (const QDBusIntrospection::Signal &signal : interface->signals_) {
|
||||
hs << " ";
|
||||
if (signal.annotations.value(QLatin1String("org.freedesktop.DBus.Deprecated")) ==
|
||||
@ -671,12 +671,12 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
QStringList argNames = makeArgNames(signal.outputArgs);
|
||||
writeSignalArgList(hs, argNames, signal.annotations, signal.outputArgs);
|
||||
|
||||
hs << ");" << endl; // finished for header
|
||||
hs << ");" << Qt::endl; // finished for header
|
||||
}
|
||||
|
||||
// close the class:
|
||||
hs << "};" << endl
|
||||
<< endl;
|
||||
hs << "};" << Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
if (!skipNamespaces) {
|
||||
@ -698,17 +698,17 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
// i parts matched
|
||||
// close last.arguments().count() - i namespaces:
|
||||
for (int j = i; j < last.count(); ++j)
|
||||
hs << QString((last.count() - j - 1 + i) * 2, QLatin1Char(' ')) << "}" << endl;
|
||||
hs << QString((last.count() - j - 1 + i) * 2, QLatin1Char(' ')) << "}" << Qt::endl;
|
||||
|
||||
// open current.arguments().count() - i namespaces
|
||||
for (int j = i; j < current.count(); ++j)
|
||||
hs << QString(j * 2, QLatin1Char(' ')) << "namespace " << current.at(j) << " {" << endl;
|
||||
hs << QString(j * 2, QLatin1Char(' ')) << "namespace " << current.at(j) << " {" << Qt::endl;
|
||||
|
||||
// add this class:
|
||||
if (!name.isEmpty()) {
|
||||
hs << QString(current.count() * 2, QLatin1Char(' '))
|
||||
<< "typedef ::" << classNameForInterface(it->constData()->name, Proxy)
|
||||
<< " " << name << ";" << endl;
|
||||
<< " " << name << ";" << Qt::endl;
|
||||
}
|
||||
|
||||
if (it == interfaces.constEnd())
|
||||
@ -719,12 +719,12 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
}
|
||||
|
||||
// close the include guard
|
||||
hs << "#endif" << endl;
|
||||
hs << "#endif" << Qt::endl;
|
||||
|
||||
QString mocName = moc(filename);
|
||||
if (includeMocs && !mocName.isEmpty())
|
||||
cs << endl
|
||||
<< "#include \"" << mocName << "\"" << endl;
|
||||
cs << Qt::endl
|
||||
<< "#include \"" << mocName << "\"" << Qt::endl;
|
||||
|
||||
cs.flush();
|
||||
hs.flush();
|
||||
@ -772,36 +772,36 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
}
|
||||
includeGuard = QString(QLatin1String("%1"))
|
||||
.arg(includeGuard);
|
||||
hs << "#ifndef " << includeGuard << endl
|
||||
<< "#define " << includeGuard << endl
|
||||
<< endl;
|
||||
hs << "#ifndef " << includeGuard << Qt::endl
|
||||
<< "#define " << includeGuard << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// include our stuff:
|
||||
hs << "#include <QtCore/QObject>" << endl;
|
||||
hs << "#include <QtCore/QObject>" << Qt::endl;
|
||||
if (cppName == headerName)
|
||||
hs << "#include <QtCore/QMetaObject>" << endl
|
||||
<< "#include <QtCore/QVariant>" << endl;
|
||||
hs << "#include <QtDBus/QtDBus>" << endl;
|
||||
hs << "#include <QtCore/QMetaObject>" << Qt::endl
|
||||
<< "#include <QtCore/QVariant>" << Qt::endl;
|
||||
hs << "#include <QtDBus/QtDBus>" << Qt::endl;
|
||||
|
||||
for (const QString &include : qAsConst(includes)) {
|
||||
hs << "#include \"" << include << "\"" << endl;
|
||||
hs << "#include \"" << include << "\"" << Qt::endl;
|
||||
if (headerName.isEmpty())
|
||||
cs << "#include \"" << include << "\"" << endl;
|
||||
cs << "#include \"" << include << "\"" << Qt::endl;
|
||||
}
|
||||
|
||||
if (cppName != headerName) {
|
||||
if (!headerName.isEmpty() && headerName != QLatin1String("-"))
|
||||
cs << "#include \"" << headerName << "\"" << endl;
|
||||
cs << "#include \"" << headerName << "\"" << Qt::endl;
|
||||
|
||||
cs << "#include <QtCore/QMetaObject>" << endl
|
||||
cs << "#include <QtCore/QMetaObject>" << Qt::endl
|
||||
<< includeList
|
||||
<< endl;
|
||||
<< Qt::endl;
|
||||
hs << forwardDeclarations;
|
||||
} else {
|
||||
hs << includeList;
|
||||
}
|
||||
|
||||
hs << endl;
|
||||
hs << Qt::endl;
|
||||
|
||||
QString parent = parentClassName;
|
||||
if (parentClassName.isEmpty())
|
||||
@ -811,47 +811,47 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
QString className = classNameForInterface(interface->name, Adaptor);
|
||||
|
||||
// comment:
|
||||
hs << "/*" << endl
|
||||
<< " * Adaptor class for interface " << interface->name << endl
|
||||
<< " */" << endl;
|
||||
cs << "/*" << endl
|
||||
<< " * Implementation of adaptor class " << className << endl
|
||||
<< " */" << endl
|
||||
<< endl;
|
||||
hs << "/*" << Qt::endl
|
||||
<< " * Adaptor class for interface " << interface->name << Qt::endl
|
||||
<< " */" << Qt::endl;
|
||||
cs << "/*" << Qt::endl
|
||||
<< " * Implementation of adaptor class " << className << Qt::endl
|
||||
<< " */" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// class header:
|
||||
hs << "class " << className << ": public QDBusAbstractAdaptor" << endl
|
||||
<< "{" << endl
|
||||
<< " Q_OBJECT" << endl
|
||||
<< " Q_CLASSINFO(\"D-Bus Interface\", \"" << interface->name << "\")" << endl
|
||||
<< " Q_CLASSINFO(\"D-Bus Introspection\", \"\"" << endl
|
||||
hs << "class " << className << ": public QDBusAbstractAdaptor" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " Q_OBJECT" << Qt::endl
|
||||
<< " Q_CLASSINFO(\"D-Bus Interface\", \"" << interface->name << "\")" << Qt::endl
|
||||
<< " Q_CLASSINFO(\"D-Bus Introspection\", \"\"" << Qt::endl
|
||||
<< stringify(interface->introspection)
|
||||
<< " \"\")" << endl
|
||||
<< "public:" << endl
|
||||
<< " " << className << "(" << parent << " *parent);" << endl
|
||||
<< " virtual ~" << className << "();" << endl
|
||||
<< endl;
|
||||
<< " \"\")" << Qt::endl
|
||||
<< "public:" << Qt::endl
|
||||
<< " " << className << "(" << parent << " *parent);" << Qt::endl
|
||||
<< " virtual ~" << className << "();" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
if (!parentClassName.isEmpty())
|
||||
hs << " inline " << parent << " *parent() const" << endl
|
||||
<< " { return static_cast<" << parent << " *>(QObject::parent()); }" << endl
|
||||
<< endl;
|
||||
hs << " inline " << parent << " *parent() const" << Qt::endl
|
||||
<< " { return static_cast<" << parent << " *>(QObject::parent()); }" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
// constructor/destructor
|
||||
cs << className << "::" << className << "(" << parent << " *parent)" << endl
|
||||
<< " : QDBusAbstractAdaptor(parent)" << endl
|
||||
<< "{" << endl
|
||||
<< " // constructor" << endl
|
||||
<< " setAutoRelaySignals(true);" << endl
|
||||
<< "}" << endl
|
||||
<< endl
|
||||
<< className << "::~" << className << "()" << endl
|
||||
<< "{" << endl
|
||||
<< " // destructor" << endl
|
||||
<< "}" << endl
|
||||
<< endl;
|
||||
cs << className << "::" << className << "(" << parent << " *parent)" << Qt::endl
|
||||
<< " : QDBusAbstractAdaptor(parent)" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " // constructor" << Qt::endl
|
||||
<< " setAutoRelaySignals(true);" << Qt::endl
|
||||
<< "}" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< className << "::~" << className << "()" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " // destructor" << Qt::endl
|
||||
<< "}" << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
hs << "public: // PROPERTIES" << endl;
|
||||
hs << "public: // PROPERTIES" << Qt::endl;
|
||||
for (const QDBusIntrospection::Property &property : interface->properties) {
|
||||
QByteArray type = qtTypeName(property.type, property.annotations);
|
||||
QString constRefType = constRefArg(type);
|
||||
@ -863,38 +863,38 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
hs << " READ " << getter;
|
||||
if (property.access != QDBusIntrospection::Property::Read)
|
||||
hs << " WRITE " << setter;
|
||||
hs << ")" << endl;
|
||||
hs << ")" << Qt::endl;
|
||||
|
||||
// getter:
|
||||
if (property.access != QDBusIntrospection::Property::Write) {
|
||||
hs << " " << type << " " << getter << "() const;" << endl;
|
||||
hs << " " << type << " " << getter << "() const;" << Qt::endl;
|
||||
cs << type << " "
|
||||
<< className << "::" << getter << "() const" << endl
|
||||
<< "{" << endl
|
||||
<< " // get the value of property " << property.name << endl
|
||||
<< " return qvariant_cast< " << type <<" >(parent()->property(\"" << property.name << "\"));" << endl
|
||||
<< "}" << endl
|
||||
<< endl;
|
||||
<< className << "::" << getter << "() const" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " // get the value of property " << property.name << Qt::endl
|
||||
<< " return qvariant_cast< " << type <<" >(parent()->property(\"" << property.name << "\"));" << Qt::endl
|
||||
<< "}" << Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
// setter
|
||||
if (property.access != QDBusIntrospection::Property::Read) {
|
||||
hs << " void " << setter << "(" << constRefType << "value);" << endl;
|
||||
cs << "void " << className << "::" << setter << "(" << constRefType << "value)" << endl
|
||||
<< "{" << endl
|
||||
<< " // set the value of property " << property.name << endl
|
||||
hs << " void " << setter << "(" << constRefType << "value);" << Qt::endl;
|
||||
cs << "void " << className << "::" << setter << "(" << constRefType << "value)" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " // set the value of property " << property.name << Qt::endl
|
||||
<< " parent()->setProperty(\"" << property.name << "\", QVariant::fromValue(value";
|
||||
if (constRefType.contains(QLatin1String("QDBusVariant")))
|
||||
cs << ".variant()";
|
||||
cs << "));" << endl
|
||||
<< "}" << endl
|
||||
<< endl;
|
||||
cs << "));" << Qt::endl
|
||||
<< "}" << Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
hs << endl;
|
||||
hs << Qt::endl;
|
||||
}
|
||||
|
||||
hs << "public Q_SLOTS: // METHODS" << endl;
|
||||
hs << "public Q_SLOTS: // METHODS" << Qt::endl;
|
||||
for (const QDBusIntrospection::Method &method : interface->methods) {
|
||||
bool isNoReply =
|
||||
method.annotations.value(QLatin1String(ANNOTATION_NO_WAIT)) == QLatin1String("true");
|
||||
@ -930,10 +930,10 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
writeArgList(hs, argNames, method.annotations, method.inputArgs, method.outputArgs);
|
||||
writeArgList(cs, argNames, method.annotations, method.inputArgs, method.outputArgs);
|
||||
|
||||
hs << ");" << endl; // finished for header
|
||||
cs << ")" << endl
|
||||
<< "{" << endl
|
||||
<< " // handle method call " << interface->name << "." << methodName(method) << endl;
|
||||
hs << ");" << Qt::endl; // finished for header
|
||||
cs << ")" << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< " // handle method call " << interface->name << "." << methodName(method) << Qt::endl;
|
||||
|
||||
// make the call
|
||||
bool usingInvokeMethod = false;
|
||||
@ -945,7 +945,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
// we are using QMetaObject::invokeMethod
|
||||
if (!returnType.isEmpty())
|
||||
cs << " " << returnType << " " << argNames.at(method.inputArgs.count())
|
||||
<< ";" << endl;
|
||||
<< ";" << Qt::endl;
|
||||
|
||||
static const char invoke[] = " QMetaObject::invokeMethod(parent(), \"";
|
||||
cs << invoke << name << "\"";
|
||||
@ -966,10 +966,10 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
<< argNames.at(i)
|
||||
<< ")";
|
||||
|
||||
cs << ");" << endl;
|
||||
cs << ");" << Qt::endl;
|
||||
|
||||
if (!returnType.isEmpty())
|
||||
cs << " return " << argNames.at(method.inputArgs.count()) << ";" << endl;
|
||||
cs << " return " << argNames.at(method.inputArgs.count()) << ";" << Qt::endl;
|
||||
} else {
|
||||
if (parentClassName.isEmpty())
|
||||
cs << " //";
|
||||
@ -997,13 +997,13 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
first = false;
|
||||
}
|
||||
|
||||
cs << ");" << endl;
|
||||
cs << ");" << Qt::endl;
|
||||
}
|
||||
cs << "}" << endl
|
||||
<< endl;
|
||||
cs << "}" << Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
hs << "Q_SIGNALS: // SIGNALS" << endl;
|
||||
hs << "Q_SIGNALS: // SIGNALS" << Qt::endl;
|
||||
for (const QDBusIntrospection::Signal &signal : interface->signals_) {
|
||||
hs << " ";
|
||||
if (signal.annotations.value(QLatin1String("org.freedesktop.DBus.Deprecated")) ==
|
||||
@ -1015,21 +1015,21 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
QStringList argNames = makeArgNames(signal.outputArgs);
|
||||
writeSignalArgList(hs, argNames, signal.annotations, signal.outputArgs);
|
||||
|
||||
hs << ");" << endl; // finished for header
|
||||
hs << ");" << Qt::endl; // finished for header
|
||||
}
|
||||
|
||||
// close the class:
|
||||
hs << "};" << endl
|
||||
<< endl;
|
||||
hs << "};" << Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
// close the include guard
|
||||
hs << "#endif" << endl;
|
||||
hs << "#endif" << Qt::endl;
|
||||
|
||||
QString mocName = moc(filename);
|
||||
if (includeMocs && !mocName.isEmpty())
|
||||
cs << endl
|
||||
<< "#include \"" << mocName << "\"" << endl;
|
||||
cs << Qt::endl
|
||||
<< "#include \"" << mocName << "\"" << Qt::endl;
|
||||
|
||||
cs.flush();
|
||||
hs.flush();
|
||||
|
@ -43,7 +43,7 @@ void generateSeparator(int i, QTextStream &out)
|
||||
if (!(i % 10)) {
|
||||
if (i)
|
||||
out << ",";
|
||||
out << endl << " ";
|
||||
out << Qt::endl << " ";
|
||||
} else {
|
||||
out << ", ";
|
||||
}
|
||||
@ -187,14 +187,14 @@ void CppGenerator::operator () ()
|
||||
{
|
||||
if (verbose)
|
||||
qout() << "*** Warning. Found a reduce/reduce conflict in state " << q << " on token ``" << s << "'' between rule "
|
||||
<< r << " and " << -u << endl;
|
||||
<< r << " and " << -u << Qt::endl;
|
||||
|
||||
++reduce_reduce_conflict_count;
|
||||
|
||||
u = qMax (u, -r);
|
||||
|
||||
if (verbose)
|
||||
qout() << "\tresolved using rule " << -u << endl;
|
||||
qout() << "\tresolved using rule " << -u << Qt::endl;
|
||||
}
|
||||
|
||||
else if (u > 0)
|
||||
@ -227,7 +227,7 @@ void CppGenerator::operator () ()
|
||||
++shift_reduce_conflict_count;
|
||||
|
||||
if (verbose)
|
||||
qout() << "*** Warning. Found a shift/reduce conflict in state " << q << " on token ``" << s << "'' with rule " << r << endl;
|
||||
qout() << "*** Warning. Found a shift/reduce conflict in state " << q << " on token ``" << s << "'' with rule " << r << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -238,11 +238,11 @@ void CppGenerator::operator () ()
|
||||
{
|
||||
if (shift_reduce_conflict_count != grammar.expected_shift_reduce
|
||||
|| reduce_reduce_conflict_count != grammar.expected_reduce_reduce)
|
||||
qerr() << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << endl;
|
||||
qerr() << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << Qt::endl;
|
||||
|
||||
if (verbose)
|
||||
qout() << endl << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << endl
|
||||
<< endl;
|
||||
qout() << Qt::endl << "*** Conflicts: " << shift_reduce_conflict_count << " shift/reduce, " << reduce_reduce_conflict_count << " reduce/reduce" << Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
QBitArray used_rules (grammar.rules.count ());
|
||||
@ -266,7 +266,7 @@ void CppGenerator::operator () ()
|
||||
RulePointer rule = grammar.rules.begin () + i;
|
||||
|
||||
if (rule != grammar.goal)
|
||||
qerr() << "*** Warning: Rule ``" << *rule << "'' is useless!" << endl;
|
||||
qerr() << "*** Warning: Rule ``" << *rule << "'' is useless!" << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -348,26 +348,26 @@ void CppGenerator::operator () ()
|
||||
{
|
||||
out << copyrightHeader()
|
||||
<< privateCopyrightHeader()
|
||||
<< endl;
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
out << "// This file was generated by qlalr - DO NOT EDIT!\n";
|
||||
|
||||
out << startIncludeGuard(grammar.merged_output) << endl;
|
||||
out << startIncludeGuard(grammar.merged_output) << Qt::endl;
|
||||
|
||||
if (copyright) {
|
||||
out << "#if defined(ERROR)" << endl
|
||||
<< "# undef ERROR" << endl
|
||||
<< "#endif" << endl << endl;
|
||||
out << "#if defined(ERROR)" << Qt::endl
|
||||
<< "# undef ERROR" << Qt::endl
|
||||
<< "#endif" << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
generateDecl (out);
|
||||
generateImpl (out);
|
||||
out << p.decls();
|
||||
out << p.impls();
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
|
||||
out << endIncludeGuard(grammar.merged_output) << endl;
|
||||
out << endIncludeGuard(grammar.merged_output) << Qt::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
@ -388,24 +388,24 @@ void CppGenerator::operator () ()
|
||||
{
|
||||
out << copyrightHeader()
|
||||
<< privateCopyrightHeader()
|
||||
<< endl;
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
out << "// This file was generated by qlalr - DO NOT EDIT!\n";
|
||||
|
||||
out << "#ifndef " << prot << endl
|
||||
<< "#define " << prot << endl
|
||||
<< endl;
|
||||
out << "#ifndef " << prot << Qt::endl
|
||||
<< "#define " << prot << Qt::endl
|
||||
<< Qt::endl;
|
||||
|
||||
if (copyright) {
|
||||
out << "#include <QtCore/qglobal.h>" << endl << endl;
|
||||
out << "QT_BEGIN_NAMESPACE" << endl << endl;
|
||||
out << "#include <QtCore/qglobal.h>" << Qt::endl << Qt::endl;
|
||||
out << "QT_BEGIN_NAMESPACE" << Qt::endl << Qt::endl;
|
||||
}
|
||||
generateDecl (out);
|
||||
if (copyright)
|
||||
out << "QT_END_NAMESPACE" << endl;
|
||||
out << "QT_END_NAMESPACE" << Qt::endl;
|
||||
|
||||
out << "#endif // " << prot << endl << endl;
|
||||
out << "#endif // " << prot << Qt::endl << Qt::endl;
|
||||
} // end decls
|
||||
|
||||
{ // bits...
|
||||
@ -419,12 +419,12 @@ void CppGenerator::operator () ()
|
||||
|
||||
out << "// This file was generated by qlalr - DO NOT EDIT!\n";
|
||||
|
||||
out << "#include \"" << declFileName << "\"" << endl << endl;
|
||||
out << "#include \"" << declFileName << "\"" << Qt::endl << Qt::endl;
|
||||
if (copyright)
|
||||
out << "QT_BEGIN_NAMESPACE" << endl << endl;
|
||||
out << "QT_BEGIN_NAMESPACE" << Qt::endl << Qt::endl;
|
||||
generateImpl(out);
|
||||
if (copyright)
|
||||
out << "QT_END_NAMESPACE" << endl;
|
||||
out << "QT_END_NAMESPACE" << Qt::endl;
|
||||
|
||||
} // end bits
|
||||
|
||||
@ -455,10 +455,10 @@ QString CppGenerator::debugInfoProt() const
|
||||
|
||||
void CppGenerator::generateDecl (QTextStream &out)
|
||||
{
|
||||
out << "class " << grammar.table_name << endl
|
||||
<< "{" << endl
|
||||
<< "public:" << endl
|
||||
<< " enum VariousConstants {" << endl;
|
||||
out << "class " << grammar.table_name << Qt::endl
|
||||
<< "{" << Qt::endl
|
||||
<< "public:" << Qt::endl
|
||||
<< " enum VariousConstants {" << Qt::endl;
|
||||
|
||||
for (const Name &t : qAsConst(grammar.terminals))
|
||||
{
|
||||
@ -474,62 +474,62 @@ void CppGenerator::generateDecl (QTextStream &out)
|
||||
else
|
||||
name.prepend (grammar.token_prefix);
|
||||
|
||||
out << " " << name << " = " << value << "," << endl;
|
||||
out << " " << name << " = " << value << "," << Qt::endl;
|
||||
}
|
||||
|
||||
out << endl
|
||||
<< " ACCEPT_STATE = " << accept_state << "," << endl
|
||||
<< " RULE_COUNT = " << grammar.rules.size () << "," << endl
|
||||
<< " STATE_COUNT = " << state_count << "," << endl
|
||||
<< " TERMINAL_COUNT = " << terminal_count << "," << endl
|
||||
<< " NON_TERMINAL_COUNT = " << non_terminal_count << "," << endl
|
||||
<< endl
|
||||
<< " GOTO_INDEX_OFFSET = " << compressed_action.index.size () << "," << endl
|
||||
<< " GOTO_INFO_OFFSET = " << compressed_action.info.size () << "," << endl
|
||||
<< " GOTO_CHECK_OFFSET = " << compressed_action.check.size () << endl
|
||||
<< " };" << endl
|
||||
<< endl
|
||||
<< " static const char *const spell[];" << endl
|
||||
<< " static const short lhs[];" << endl
|
||||
<< " static const short rhs[];" << endl;
|
||||
out << Qt::endl
|
||||
<< " ACCEPT_STATE = " << accept_state << "," << Qt::endl
|
||||
<< " RULE_COUNT = " << grammar.rules.size () << "," << Qt::endl
|
||||
<< " STATE_COUNT = " << state_count << "," << Qt::endl
|
||||
<< " TERMINAL_COUNT = " << terminal_count << "," << Qt::endl
|
||||
<< " NON_TERMINAL_COUNT = " << non_terminal_count << "," << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " GOTO_INDEX_OFFSET = " << compressed_action.index.size () << "," << Qt::endl
|
||||
<< " GOTO_INFO_OFFSET = " << compressed_action.info.size () << "," << Qt::endl
|
||||
<< " GOTO_CHECK_OFFSET = " << compressed_action.check.size () << Qt::endl
|
||||
<< " };" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " static const char *const spell[];" << Qt::endl
|
||||
<< " static const short lhs[];" << Qt::endl
|
||||
<< " static const short rhs[];" << Qt::endl;
|
||||
|
||||
if (debug_info)
|
||||
{
|
||||
QString prot = debugInfoProt();
|
||||
|
||||
out << endl << "#ifndef " << prot << endl
|
||||
<< " static const int rule_index[];" << endl
|
||||
<< " static const int rule_info[];" << endl
|
||||
<< "#endif // " << prot << endl << endl;
|
||||
out << Qt::endl << "#ifndef " << prot << Qt::endl
|
||||
<< " static const int rule_index[];" << Qt::endl
|
||||
<< " static const int rule_info[];" << Qt::endl
|
||||
<< "#endif // " << prot << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
out << " static const short goto_default[];" << endl
|
||||
<< " static const short action_default[];" << endl
|
||||
<< " static const short action_index[];" << endl
|
||||
<< " static const short action_info[];" << endl
|
||||
<< " static const short action_check[];" << endl
|
||||
<< endl
|
||||
<< " static inline int nt_action (int state, int nt)" << endl
|
||||
<< " {" << endl
|
||||
<< " const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;" << endl
|
||||
<< " if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)" << endl
|
||||
<< " return goto_default [nt];" << endl
|
||||
<< endl
|
||||
<< " return action_info [GOTO_INFO_OFFSET + yyn];" << endl
|
||||
<< " }" << endl
|
||||
<< endl
|
||||
<< " static inline int t_action (int state, int token)" << endl
|
||||
<< " {" << endl
|
||||
<< " const int yyn = action_index [state] + token;" << endl
|
||||
<< endl
|
||||
<< " if (yyn < 0 || action_check [yyn] != token)" << endl
|
||||
<< " return - action_default [state];" << endl
|
||||
<< endl
|
||||
<< " return action_info [yyn];" << endl
|
||||
<< " }" << endl
|
||||
<< "};" << endl
|
||||
<< endl
|
||||
<< endl;
|
||||
out << " static const short goto_default[];" << Qt::endl
|
||||
<< " static const short action_default[];" << Qt::endl
|
||||
<< " static const short action_index[];" << Qt::endl
|
||||
<< " static const short action_info[];" << Qt::endl
|
||||
<< " static const short action_check[];" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " static inline int nt_action (int state, int nt)" << Qt::endl
|
||||
<< " {" << Qt::endl
|
||||
<< " const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;" << Qt::endl
|
||||
<< " if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)" << Qt::endl
|
||||
<< " return goto_default [nt];" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " return action_info [GOTO_INFO_OFFSET + yyn];" << Qt::endl
|
||||
<< " }" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " static inline int t_action (int state, int token)" << Qt::endl
|
||||
<< " {" << Qt::endl
|
||||
<< " const int yyn = action_index [state] + token;" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " if (yyn < 0 || action_check [yyn] != token)" << Qt::endl
|
||||
<< " return - action_default [state];" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " return action_info [yyn];" << Qt::endl
|
||||
<< " }" << Qt::endl
|
||||
<< "};" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< Qt::endl;
|
||||
}
|
||||
|
||||
void CppGenerator::generateImpl (QTextStream &out)
|
||||
@ -568,16 +568,16 @@ void CppGenerator::generateImpl (QTextStream &out)
|
||||
{
|
||||
first_nt = false;
|
||||
QString prot = debugInfoProt();
|
||||
out << endl << "#ifndef " << prot << endl;
|
||||
out << Qt::endl << "#ifndef " << prot << Qt::endl;
|
||||
}
|
||||
out << "\"" << *t << "\"";
|
||||
}
|
||||
}
|
||||
|
||||
if (debug_info)
|
||||
out << endl << "#endif // " << debugInfoProt() << endl;
|
||||
out << Qt::endl << "#endif // " << debugInfoProt() << Qt::endl;
|
||||
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const short " << grammar.table_name << "::lhs [] = {";
|
||||
idx = 0;
|
||||
@ -587,7 +587,7 @@ void CppGenerator::generateImpl (QTextStream &out)
|
||||
|
||||
out << aut.id (rule->lhs);
|
||||
}
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const short " << grammar.table_name << "::rhs [] = {";
|
||||
idx = 0;
|
||||
@ -597,13 +597,13 @@ void CppGenerator::generateImpl (QTextStream &out)
|
||||
|
||||
out << rule->rhs.size ();
|
||||
}
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
if (debug_info)
|
||||
{
|
||||
QString prot = debugInfoProt();
|
||||
|
||||
out << endl << "#ifndef " << prot << endl;
|
||||
out << Qt::endl << "#ifndef " << prot << Qt::endl;
|
||||
out << "const int " << grammar.table_name << "::rule_info [] = {";
|
||||
idx = 0;
|
||||
for (auto rule = grammar.rules.cbegin (); rule != grammar.rules.cend (); ++rule, ++idx)
|
||||
@ -615,7 +615,7 @@ void CppGenerator::generateImpl (QTextStream &out)
|
||||
for (const Name &n : rule->rhs)
|
||||
out << ", " << name_ids.value (n);
|
||||
}
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const int " << grammar.table_name << "::rule_index [] = {";
|
||||
idx = 0;
|
||||
@ -627,8 +627,8 @@ void CppGenerator::generateImpl (QTextStream &out)
|
||||
out << offset;
|
||||
offset += rule->rhs.size () + 1;
|
||||
}
|
||||
out << endl << "};" << endl
|
||||
<< "#endif // " << prot << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl
|
||||
<< "#endif // " << prot << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
||||
out << "const short " << grammar.table_name << "::action_default [] = {";
|
||||
@ -642,27 +642,27 @@ void CppGenerator::generateImpl (QTextStream &out)
|
||||
else
|
||||
out << "0";
|
||||
}
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const short " << grammar.table_name << "::goto_default [] = {";
|
||||
generateList(defgoto, out);
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const short " << grammar.table_name << "::action_index [] = {";
|
||||
generateList(compressed_action.index, out);
|
||||
out << "," << endl;
|
||||
out << "," << Qt::endl;
|
||||
generateList(compressed_goto.index, out);
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const short " << grammar.table_name << "::action_info [] = {";
|
||||
generateList(compressed_action.info, out);
|
||||
out << "," << endl;
|
||||
out << "," << Qt::endl;
|
||||
generateList(compressed_goto.info, out);
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "const short " << grammar.table_name << "::action_check [] = {";
|
||||
generateList(compressed_action.check, out);
|
||||
out << "," << endl;
|
||||
out << "," << Qt::endl;
|
||||
generateList(compressed_goto.check, out);
|
||||
out << endl << "};" << endl << endl;
|
||||
out << Qt::endl << "};" << Qt::endl << Qt::endl;
|
||||
}
|
||||
|
@ -41,9 +41,9 @@ void DotGraph::operator () (Automaton *aut)
|
||||
{
|
||||
Grammar *g = aut->_M_grammar;
|
||||
|
||||
out << "digraph {" << endl << endl;
|
||||
out << "digraph {" << Qt::endl << Qt::endl;
|
||||
|
||||
out << "subgraph Includes {" << endl;
|
||||
out << "subgraph Includes {" << Qt::endl;
|
||||
for (Automaton::IncludesGraph::iterator incl = Automaton::IncludesGraph::begin_nodes ();
|
||||
incl != Automaton::IncludesGraph::end_nodes (); ++incl)
|
||||
{
|
||||
@ -53,14 +53,14 @@ void DotGraph::operator () (Automaton *aut)
|
||||
out << "\t->\t";
|
||||
out << "\"(" << aut->id ((*edge)->data.state) << ", " << (*edge)->data.nt << ")\"\t";
|
||||
out << "[label=\"" << incl->data.state->follows [incl->data.nt] << "\"]";
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
}
|
||||
}
|
||||
out << "}" << endl << endl;
|
||||
out << "}" << Qt::endl << Qt::endl;
|
||||
|
||||
|
||||
out << "subgraph LRA {" << endl;
|
||||
//out << "node [shape=record];" << endl << endl;
|
||||
out << "subgraph LRA {" << Qt::endl;
|
||||
//out << "node [shape=record];" << Qt::endl << Qt::endl;
|
||||
|
||||
for (StatePointer q = aut->states.begin (); q != aut->states.end (); ++q)
|
||||
{
|
||||
@ -74,16 +74,16 @@ void DotGraph::operator () (Automaton *aut)
|
||||
for (ItemPointer item = q->kernel.begin (); item != q->kernel.end (); ++item)
|
||||
out << "| <" << index++ << "> " << *item;
|
||||
|
||||
out << "}\"]" << endl;
|
||||
out << "}\"]" << Qt::endl;
|
||||
|
||||
for (Bundle::iterator a = q->bundle.begin (); a != q->bundle.end (); ++a)
|
||||
{
|
||||
const char *clr = g->isTerminal (a.key ()) ? "blue" : "red";
|
||||
out << "\t" << state << "\t->\t" << aut->id (*a) << "\t[color=\"" << clr << "\",label=\"" << a.key () << "\"]" << endl;
|
||||
out << "\t" << state << "\t->\t" << aut->id (*a) << "\t[color=\"" << clr << "\",label=\"" << a.key () << "\"]" << Qt::endl;
|
||||
}
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
}
|
||||
|
||||
out << "}" << endl;
|
||||
out << endl << endl << "}" << endl;
|
||||
out << "}" << Qt::endl;
|
||||
out << Qt::endl << Qt::endl << "}" << Qt::endl;
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ void Automaton::buildNullables ()
|
||||
}
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_NULLABLES
|
||||
qerr() << "nullables = {" << nullables << endl;
|
||||
qerr() << "nullables = {" << nullables << Qt::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ void Automaton::buildLookbackSets ()
|
||||
lookbacks.insert (item, Lookback (p, A));
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_LOOKBACKS
|
||||
qerr() << "*** (" << id (q) << ", " << *rule << ") lookback (" << id (p) << ", " << *A << ")" << endl;
|
||||
qerr() << "*** (" << id (q) << ", " << *rule << ") lookback (" << id (p) << ", " << *A << ")" << Qt::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -487,7 +487,7 @@ void Automaton::buildDirectReads ()
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_DIRECT_READS
|
||||
for (QMap<Name, NameSet>::iterator dr = q->reads.begin (); dr != q->reads.end (); ++dr)
|
||||
qerr() << "*** DR(" << id (q) << ", " << dr.key () << ") = " << dr.value () << endl;
|
||||
qerr() << "*** DR(" << id (q) << ", " << dr.key () << ") = " << dr.value () << Qt::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -520,7 +520,7 @@ void Automaton::buildReadsDigraph ()
|
||||
dump (qerr(), source);
|
||||
qerr() << " reads ";
|
||||
dump (qerr(), target);
|
||||
qerr() << endl;
|
||||
qerr() << Qt::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -555,7 +555,7 @@ void Automaton::visitReadNode (ReadNode node)
|
||||
_M_reads_stack.push (node);
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_INCLUDES
|
||||
// qerr() << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << endl;
|
||||
// qerr() << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << Qt::endl;
|
||||
#endif
|
||||
|
||||
for (ReadsGraph::edge_iterator edge = node->begin (); edge != node->end (); ++edge)
|
||||
@ -635,7 +635,7 @@ void Automaton::buildIncludesDigraph ()
|
||||
source->insertEdge (target);
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_INCLUDES
|
||||
qerr() << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << endl;
|
||||
qerr() << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << Qt::endl;
|
||||
#endif // QLALR_NO_DEBUG_INCLUDES
|
||||
|
||||
continue;
|
||||
@ -657,7 +657,7 @@ void Automaton::buildIncludesDigraph ()
|
||||
source->insertEdge (target);
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_INCLUDES
|
||||
qerr() << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << endl;
|
||||
qerr() << "*** (" << id (p) << ", " << *A << ") includes (" << id (pp) << ", " << *name << ")" << Qt::endl;
|
||||
#endif // QLALR_NO_DEBUG_INCLUDES
|
||||
}
|
||||
}
|
||||
@ -674,7 +674,7 @@ void Automaton::visitIncludeNode (IncludeNode node)
|
||||
_M_includes_stack.push (node);
|
||||
|
||||
#ifndef QLALR_NO_DEBUG_INCLUDES
|
||||
// qerr() << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << endl;
|
||||
// qerr() << "*** Debug. visit node (" << id (node->data.state) << ", " << node->data.nt << ") N = " << N << Qt::endl;
|
||||
#endif
|
||||
|
||||
for (IncludesGraph::edge_iterator edge = node->begin (); edge != node->end (); ++edge)
|
||||
@ -690,7 +690,7 @@ void Automaton::visitIncludeNode (IncludeNode node)
|
||||
dump (qerr(), node);
|
||||
qerr() << " += follows";
|
||||
dump (qerr(), r);
|
||||
qerr() << endl;
|
||||
qerr() << Qt::endl;
|
||||
#endif
|
||||
|
||||
NameSet &dst = node->data.state->follows [node->data.nt];
|
||||
@ -726,7 +726,7 @@ void Automaton::buildLookaheads ()
|
||||
#ifndef QLALR_NO_DEBUG_LOOKAHEADS
|
||||
qerr() << "(" << id (p) << ", " << *item->rule << ") lookbacks ";
|
||||
dump (qerr(), lookback);
|
||||
qerr() << " with follows (" << id (q) << ", " << lookback.nt << ") = " << q->follows [lookback.nt] << endl;
|
||||
qerr() << " with follows (" << id (q) << ", " << lookback.nt << ") = " << q->follows [lookback.nt] << Qt::endl;
|
||||
#endif
|
||||
|
||||
lookaheads [item].insert (q->follows [lookback.nt].begin (), q->follows [lookback.nt].end ());
|
||||
|
@ -261,7 +261,7 @@ int Recognizer::nextToken()
|
||||
if (ch == QLatin1Char ('"'))
|
||||
inp ();
|
||||
else
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << Qt::endl;
|
||||
|
||||
_M_current_value = text;
|
||||
return (token = STRING_LITERAL);
|
||||
@ -314,7 +314,7 @@ int Recognizer::nextToken()
|
||||
return (token = PREC);
|
||||
else
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << Qt::endl;
|
||||
exit (EXIT_FAILURE);
|
||||
return (token = ERROR);
|
||||
}
|
||||
@ -659,7 +659,7 @@ case $rule_number: {
|
||||
|
||||
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ case $rule_number: {
|
||||
|
||||
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -712,7 +712,7 @@ case $rule_number: {
|
||||
Name tok = _M_grammar->intern (sym(2));
|
||||
if (! _M_grammar->isTerminal (tok))
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << Qt::endl;
|
||||
_M_current_rule->prec = _M_grammar->names.end ();
|
||||
}
|
||||
else
|
||||
@ -758,7 +758,7 @@ case $rule_number: {
|
||||
}
|
||||
}
|
||||
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Syntax error" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Syntax error" << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -44,15 +44,15 @@
|
||||
|
||||
static void help_me ()
|
||||
{
|
||||
qerr() << "Usage: qlalr [options] [input file name]" << endl
|
||||
<< endl
|
||||
<< " --help, -h\t\tdisplay this help and exit" << endl
|
||||
<< " --verbose, -v\t\tverbose output" << endl
|
||||
<< " --no-debug\t\tno debug information" << endl
|
||||
<< " --no-lines\t\tno #line directives" << endl
|
||||
<< " --dot\t\t\tgenerate a graph" << endl
|
||||
<< " --qt\t\tadd the Qt copyright header and Qt-specific types and macros" << endl
|
||||
<< endl;
|
||||
qerr() << "Usage: qlalr [options] [input file name]" << Qt::endl
|
||||
<< Qt::endl
|
||||
<< " --help, -h\t\tdisplay this help and exit" << Qt::endl
|
||||
<< " --verbose, -v\t\tverbose output" << Qt::endl
|
||||
<< " --no-debug\t\tno debug information" << Qt::endl
|
||||
<< " --no-lines\t\tno #line directives" << Qt::endl
|
||||
<< " --dot\t\t\tgenerate a graph" << Qt::endl
|
||||
<< " --qt\t\tadd the Qt copyright header and Qt-specific types and macros" << Qt::endl
|
||||
<< Qt::endl;
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ int main (int argc, char *argv[])
|
||||
file_name = arg;
|
||||
|
||||
else
|
||||
qerr() << "*** Warning. Ignore argument `" << arg << "'" << endl;
|
||||
qerr() << "*** Warning. Ignore argument `" << arg << "'" << Qt::endl;
|
||||
}
|
||||
|
||||
if (file_name.isEmpty ())
|
||||
@ -108,13 +108,13 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (grammar.rules.isEmpty ())
|
||||
{
|
||||
qerr() << "*** Fatal. No rules!" << endl;
|
||||
qerr() << "*** Fatal. No rules!" << Qt::endl;
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
else if (grammar.start == grammar.names.end ())
|
||||
{
|
||||
qerr() << "*** Fatal. No start symbol!" << endl;
|
||||
qerr() << "*** Fatal. No start symbol!" << Qt::endl;
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -43,13 +43,13 @@ void ParseTable::operator () (Automaton *aut)
|
||||
|
||||
int rindex = 1;
|
||||
for (RulePointer rule = g->rules.begin (); rule != g->rules.end (); ++rule)
|
||||
out << rindex++ << ")\t" << *rule << endl;
|
||||
out << endl << endl;
|
||||
out << rindex++ << ")\t" << *rule << Qt::endl;
|
||||
out << Qt::endl << Qt::endl;
|
||||
|
||||
int index = 0;
|
||||
for (StatePointer state = aut->states.begin (); state != aut->states.end (); ++state)
|
||||
{
|
||||
out << "state " << index++ << endl << endl;
|
||||
out << "state " << index++ << Qt::endl << Qt::endl;
|
||||
|
||||
for (ItemPointer item = state->kernel.begin (); item != state->kernel.end (); ++item)
|
||||
{
|
||||
@ -58,7 +58,7 @@ void ParseTable::operator () (Automaton *aut)
|
||||
if (item->dot == item->end_rhs ())
|
||||
out << " " << aut->lookaheads [item];
|
||||
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
@ -68,11 +68,11 @@ void ParseTable::operator () (Automaton *aut)
|
||||
continue;
|
||||
|
||||
if (first)
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
|
||||
first = false;
|
||||
|
||||
out << " " << *arrow.key () << " shift, and go to state " << std::distance (aut->states.begin (), *arrow) << endl;
|
||||
out << " " << *arrow.key () << " shift, and go to state " << std::distance (aut->states.begin (), *arrow) << Qt::endl;
|
||||
}
|
||||
|
||||
first = true;
|
||||
@ -82,13 +82,13 @@ void ParseTable::operator () (Automaton *aut)
|
||||
continue;
|
||||
|
||||
if (first)
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
|
||||
first = false;
|
||||
|
||||
const auto lookaheads = aut->lookaheads.value(item);
|
||||
for (const Name &la : lookaheads)
|
||||
out << " " << *la << " reduce using rule " << aut->id (item->rule) << " (" << *item->rule->lhs << ")" << endl;
|
||||
out << " " << *la << " reduce using rule " << aut->id (item->rule) << " (" << *item->rule->lhs << ")" << Qt::endl;
|
||||
}
|
||||
|
||||
first = true;
|
||||
@ -98,19 +98,19 @@ void ParseTable::operator () (Automaton *aut)
|
||||
continue;
|
||||
|
||||
if (first)
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
|
||||
first = false;
|
||||
|
||||
out << " " << *arrow.key () << " go to state " << std::distance (aut->states.begin (), *arrow) << endl;
|
||||
out << " " << *arrow.key () << " go to state " << std::distance (aut->states.begin (), *arrow) << Qt::endl;
|
||||
}
|
||||
|
||||
if (state->defaultReduce != g->rules.end ())
|
||||
{
|
||||
out << endl
|
||||
<< " $default reduce using rule " << aut->id (state->defaultReduce) << " (" << *state->defaultReduce->lhs << ")" << endl;
|
||||
out << Qt::endl
|
||||
<< " $default reduce using rule " << aut->id (state->defaultReduce) << " (" << *state->defaultReduce->lhs << ")" << Qt::endl;
|
||||
}
|
||||
|
||||
out << endl;
|
||||
out << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ int Recognizer::nextToken()
|
||||
if (ch == QLatin1Char ('"'))
|
||||
inp ();
|
||||
else
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Warning. Expected `\"'" << Qt::endl;
|
||||
|
||||
_M_current_value = text;
|
||||
return (token = STRING_LITERAL);
|
||||
@ -150,7 +150,7 @@ int Recognizer::nextToken()
|
||||
return (token = PREC);
|
||||
else
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Unknown keyword `" << text << "'" << Qt::endl;
|
||||
exit (EXIT_FAILURE);
|
||||
return (token = ERROR);
|
||||
}
|
||||
@ -405,7 +405,7 @@ case 34: {
|
||||
|
||||
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -420,7 +420,7 @@ case 38: {
|
||||
|
||||
if (_M_grammar->terminals.find (_M_current_rule->lhs) != _M_grammar->terminals.end ())
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Invalid non terminal `" << *_M_current_rule->lhs << "'" << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ case 40: {
|
||||
Name tok = _M_grammar->intern (sym(2));
|
||||
if (! _M_grammar->isTerminal (tok))
|
||||
{
|
||||
qerr() << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": `" << *tok << " is not a terminal symbol" << Qt::endl;
|
||||
_M_current_rule->prec = _M_grammar->names.end ();
|
||||
}
|
||||
else
|
||||
@ -474,7 +474,7 @@ case 43: {
|
||||
}
|
||||
}
|
||||
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Syntax error" << endl;
|
||||
qerr() << _M_input_file << ":" << _M_line << ": Syntax error" << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1626,7 +1626,7 @@ QString WriteInitialization::writeFontProperties(const DomFont *f)
|
||||
}
|
||||
if (f->hasElementWeight() && f->elementWeight() > 0) {
|
||||
m_output << m_indent << fontName << ".setWeight("
|
||||
<< f->elementWeight() << ");" << endl;
|
||||
<< f->elementWeight() << ");" << Qt::endl;
|
||||
}
|
||||
if (f->hasElementStrikeOut()) {
|
||||
m_output << m_indent << fontName << ".setStrikeOut("
|
||||
@ -2614,7 +2614,7 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QS
|
||||
outputStream << "#if " << language::qtConfig(list.constFirst());
|
||||
for (int i = 1, size = list.size(); i < size; ++i)
|
||||
outputStream << " || " << language::qtConfig(list.at(i));
|
||||
outputStream << endl;
|
||||
outputStream << Qt::endl;
|
||||
}
|
||||
|
||||
static void generateMultiDirectiveEnd(QTextStream &outputStream, const QSet<QString> &directives)
|
||||
@ -2622,7 +2622,7 @@ static void generateMultiDirectiveEnd(QTextStream &outputStream, const QSet<QStr
|
||||
if (directives.isEmpty())
|
||||
return;
|
||||
|
||||
outputStream << "#endif" << endl;
|
||||
outputStream << "#endif" << Qt::endl;
|
||||
}
|
||||
|
||||
WriteInitialization::Item::Item(const QString &itemClassName, const QString &indent, QTextStream &setupUiStream, QTextStream &retranslateUiStream, Driver *driver)
|
||||
@ -2680,7 +2680,7 @@ QString WriteInitialization::Item::writeSetupUi(const QString &parent, Item::Emp
|
||||
while (it != m_setupUiData.setters.constEnd()) {
|
||||
if (!it.key().isEmpty())
|
||||
m_setupUiStream << language::openQtConfig(it.key());
|
||||
m_setupUiStream << m_indent << uniqueName << it.value() << endl;
|
||||
m_setupUiStream << m_indent << uniqueName << it.value() << Qt::endl;
|
||||
if (!it.key().isEmpty())
|
||||
m_setupUiStream << language::closeQtConfig(it.key());
|
||||
++it;
|
||||
@ -2718,7 +2718,7 @@ void WriteInitialization::Item::writeRetranslateUi(const QString &parentPath)
|
||||
m_retranslateUiStream << language::openQtConfig(newDirective);
|
||||
oldDirective = newDirective;
|
||||
}
|
||||
m_retranslateUiStream << m_indent << uniqueName << it.value() << endl;
|
||||
m_retranslateUiStream << m_indent << uniqueName << it.value() << Qt::endl;
|
||||
++it;
|
||||
}
|
||||
if (!oldDirective.isEmpty())
|
||||
|
@ -210,7 +210,7 @@ QDebug operator<<(QDebug str, const QSpanCollection::Span &span)
|
||||
void QSpanCollection::updateInsertedRows(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end << endl << index;
|
||||
qDebug() << start << end << Qt::endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
@ -258,7 +258,7 @@ void QSpanCollection::updateInsertedRows(int start, int end)
|
||||
void QSpanCollection::updateInsertedColumns(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end << endl << index;
|
||||
qDebug() << start << end << Qt::endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
@ -339,7 +339,7 @@ bool QSpanCollection::cleanSpanSubIndex(QSpanCollection::SubIndex &subindex, int
|
||||
void QSpanCollection::updateRemovedRows(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end << endl << index;
|
||||
qDebug() << start << end << Qt::endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
@ -466,7 +466,7 @@ void QSpanCollection::updateRemovedRows(int start, int end)
|
||||
void QSpanCollection::updateRemovedColumns(int start, int end)
|
||||
{
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
qDebug() << start << end << endl << index;
|
||||
qDebug() << start << end << Qt::endl << index;
|
||||
#endif
|
||||
if (spans.isEmpty())
|
||||
return;
|
||||
|
@ -13180,7 +13180,7 @@ QDebug operator<<(QDebug debug, const QWidget *widget)
|
||||
if (widget->isWindow())
|
||||
debug << ", window";
|
||||
debug << ", " << geometry.width() << 'x' << geometry.height()
|
||||
<< forcesign << geometry.x() << geometry.y() << noforcesign;
|
||||
<< Qt::forcesign << geometry.x() << geometry.y() << Qt::noforcesign;
|
||||
if (frameGeometry != geometry) {
|
||||
const QMargins margins(geometry.x() - frameGeometry.x(),
|
||||
geometry.y() - frameGeometry.y(),
|
||||
@ -13190,7 +13190,7 @@ QDebug operator<<(QDebug debug, const QWidget *widget)
|
||||
}
|
||||
debug << ", devicePixelRatio=" << widget->devicePixelRatioF();
|
||||
if (const WId wid = widget->internalWinId())
|
||||
debug << ", winId=0x" << hex << wid << dec;
|
||||
debug << ", winId=0x" << Qt::hex << wid << Qt::dec;
|
||||
}
|
||||
debug << ')';
|
||||
} else {
|
||||
|
@ -1793,7 +1793,7 @@ void QSplitter::setStretchFactor(int index, int stretch)
|
||||
|
||||
QTextStream& operator<<(QTextStream& ts, const QSplitter& splitter)
|
||||
{
|
||||
ts << splitter.saveState() << endl;
|
||||
ts << splitter.saveState() << Qt::endl;
|
||||
return ts;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ QDomNode n = d.firstChild();
|
||||
while (!n.isNull()) {
|
||||
if (n.isElement()) {
|
||||
QDomElement e = n.toElement();
|
||||
cout << "Element name: " << e.tagName() << endl;
|
||||
cout << "Element name: " << e.tagName() << Qt::endl;
|
||||
break;
|
||||
}
|
||||
n = n.nextSibling();
|
||||
@ -126,10 +126,10 @@ QDomElement element4 = document.createElement("MyElement");
|
||||
QDomElement e = //...
|
||||
//...
|
||||
QDomAttr a = e.attributeNode("href");
|
||||
cout << a.value() << endl; // prints "http://qt-project.org"
|
||||
cout << a.value() << Qt::endl; // prints "http://qt-project.org"
|
||||
a.setValue("http://qt-project.org/doc"); // change the node's attribute
|
||||
QDomAttr a2 = e.attributeNode("href");
|
||||
cout << a2.value() << endl; // prints "http://qt-project.org/doc"
|
||||
cout << a2.value() << Qt::endl; // prints "http://qt-project.org/doc"
|
||||
//! [8]
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ QDomNode n = docElem.firstChild();
|
||||
while(!n.isNull()) {
|
||||
QDomElement e = n.toElement(); // try to convert the node to an element.
|
||||
if(!e.isNull()) {
|
||||
cout << qPrintable(e.tagName()) << endl; // the node really is an element.
|
||||
cout << qPrintable(e.tagName()) << Qt::endl; // the node really is an element.
|
||||
}
|
||||
n = n.nextSibling();
|
||||
}
|
||||
|
@ -3598,7 +3598,7 @@ void QDomDocumentTypePrivate::save(QTextStream& s, int, int indent) const
|
||||
}
|
||||
|
||||
if (entities->length()>0 || notations->length()>0) {
|
||||
s << " [" << endl;
|
||||
s << " [" << Qt::endl;
|
||||
|
||||
QHash<QString, QDomNodePrivate *>::const_iterator it2 = notations->map.constBegin();
|
||||
for (; it2 != notations->map.constEnd(); ++it2)
|
||||
@ -3611,7 +3611,7 @@ void QDomDocumentTypePrivate::save(QTextStream& s, int, int indent) const
|
||||
s << ']';
|
||||
}
|
||||
|
||||
s << '>' << endl;
|
||||
s << '>' << Qt::endl;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
@ -4627,7 +4627,7 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const
|
||||
|
||||
/* -1 disables new lines. */
|
||||
if (indent != -1)
|
||||
s << endl;
|
||||
s << Qt::endl;
|
||||
}
|
||||
QDomNodePrivate::save(s, depth + 1, indent); if (!last->isText())
|
||||
s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' '));
|
||||
@ -4639,7 +4639,7 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const
|
||||
if (!(next && next->isText())) {
|
||||
/* -1 disables new lines. */
|
||||
if (indent != -1)
|
||||
s << endl;
|
||||
s << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5329,7 +5329,7 @@ void QDomCommentPrivate::save(QTextStream& s, int depth, int indent) const
|
||||
s << "-->";
|
||||
|
||||
if (!(next && next->isText()))
|
||||
s << endl;
|
||||
s << Qt::endl;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
@ -5552,7 +5552,7 @@ void QDomNotationPrivate::save(QTextStream& s, int, int) const
|
||||
} else {
|
||||
s << "SYSTEM " << quotedValue(m_sys);
|
||||
}
|
||||
s << '>' << endl;
|
||||
s << '>' << Qt::endl;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
@ -5733,7 +5733,7 @@ void QDomEntityPrivate::save(QTextStream& s, int, int) const
|
||||
_name = QLatin1String("% ") + _name.mid(1);
|
||||
|
||||
if (m_sys.isNull() && m_pub.isNull()) {
|
||||
s << "<!ENTITY " << _name << " \"" << encodeEntity(value.toUtf8()) << "\">" << endl;
|
||||
s << "<!ENTITY " << _name << " \"" << encodeEntity(value.toUtf8()) << "\">" << Qt::endl;
|
||||
} else {
|
||||
s << "<!ENTITY " << _name << ' ';
|
||||
if (m_pub.isNull()) {
|
||||
@ -5744,7 +5744,7 @@ void QDomEntityPrivate::save(QTextStream& s, int, int) const
|
||||
if (! m_notationName.isNull()) {
|
||||
s << " NDATA " << m_notationName;
|
||||
}
|
||||
s << '>' << endl;
|
||||
s << '>' << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6014,7 +6014,7 @@ QDomNodePrivate* QDomProcessingInstructionPrivate::cloneNode(bool deep)
|
||||
|
||||
void QDomProcessingInstructionPrivate::save(QTextStream& s, int, int) const
|
||||
{
|
||||
s << "<?" << name << ' ' << value << "?>" << endl;
|
||||
s << "<?" << name << ' ' << value << "?>" << Qt::endl;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user