[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/automoc
From: Glen Kaukola <gkaukola () cs ! ucr ! edu>
Date: 2010-03-27 18:05:02
Message-ID: 20100327180502.EE020AC881 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1108065 by glenkaukola:
kdesupport/automoc krazy2 fixes.
M +10 -9 kde4automoc.cpp
--- trunk/kdesupport/automoc/kde4automoc.cpp #1108064:1108065
@@ -183,7 +183,7 @@
foreach (const QString &path, incPaths) {
Q_ASSERT(!path.isEmpty());
mocIncludes << "-I" + path;
- if (path.endsWith(".framework/Headers")) {
+ if (path.endsWith(QLatin1String(".framework/Headers"))) {
QDir framework(path);
// Go up twice to get to the framework root
framework.cdUp();
@@ -344,8 +344,9 @@
foreach (const QString &absFilename, sourceFiles) {
//qDebug() << absFilename;
const QFileInfo sourceFileInfo(absFilename);
- if (absFilename.endsWith(".cpp") || absFilename.endsWith(".cc") || \
absFilename.endsWith(".mm") ||
- absFilename.endsWith(".cxx") || absFilename.endsWith(".C")) {
+ if (absFilename.endsWith(QLatin1String(".cpp")) || \
absFilename.endsWith(QLatin1String(".cc")) || + \
absFilename.endsWith(QLatin1String(".mm")) || \
absFilename.endsWith(QLatin1String(".cxx")) || + \
absFilename.endsWith(QLatin1String(".C"))) { //qDebug() << "check .cpp file";
QFile sourceFile(absFilename);
sourceFile.open(QIODevice::ReadOnly);
@@ -398,7 +399,7 @@
//qDebug() << "found moc include: " << currentMoc << " at offset \
" << matchOffset; const QFileInfo currentMocInfo(currentMoc);
QString basename = currentMocInfo.completeBaseName();
- const bool moc_style = basename.startsWith("moc_");
+ const bool moc_style = \
basename.startsWith(QLatin1String("moc_"));
// If the moc include is of the moc_foo.cpp style we expect the \
Q_OBJECT class // declaration in a header file.
@@ -442,15 +443,15 @@
if (!headerFound) {
cerr << "automoc4: The file \"" << absFilename \
<<
"\" includes the moc file \"" << currentMoc \
<< "\", but neither \"" <<
- absPath + basename + "{" + \
headerExtensions.join(",") + "}\" nor \"" <<
- filepath + "{" + headerExtensions.join(",") \
+ "}" << + absPath + basename + '{' + \
headerExtensions.join(",") + "}\" nor \"" << + \
filepath + '{' + headerExtensions.join(",") + '}' << "\" exist." << endl;
::exit(EXIT_FAILURE);
}
} else {
cerr << "automoc4: The file \"" << absFilename <<
"\" includes the moc file \"" << currentMoc << \
"\", but \"" <<
- absPath + basename + "{" + \
headerExtensions.join(",") + "}" << + absPath + \
basename + '{' + headerExtensions.join(",") + '}' << "\" does not exist." << endl;
::exit(EXIT_FAILURE);
}
@@ -464,8 +465,8 @@
matchOffset + currentMoc.length());
} while(matchOffset >= 0);
}
- } else if (absFilename.endsWith(".h") || absFilename.endsWith(".hpp") ||
- absFilename.endsWith(".hxx") || absFilename.endsWith(".H")) {
+ } else if (absFilename.endsWith(QLatin1String(".h")) || \
absFilename.endsWith(QLatin1String(".hpp")) || + \
absFilename.endsWith(QLatin1String(".hxx")) || \
absFilename.endsWith(QLatin1String(".H"))) {
if (!includedMocs.contains(absFilename) && \
!notIncludedMocs.contains(absFilename)) {
// if this header is not getting processed yet and is explicitly \
mentioned for the
// automoc the moc is run unconditionally on the header and the \
resulting file is
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic