[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/kconfig_compiler
From: Ralf Habacker <Ralf.Habacker () freenet ! de>
Date: 2005-12-31 11:43:01
Message-ID: 1136029381.869272.1141.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 492860 by habacker:
win32: add '\' as possible path delimiter
M +6 -2 kconfig_compiler.cpp
--- trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp #492859:492860
@@ -285,7 +285,7 @@
static QString filenameOnly(QString path)
{
- int i = path.lastIndexOf('/');
+ int i = path.lastIndexOf(QRegExp("[/\\]"));
if (i >= 0)
return path.mid(i+1);
return path;
@@ -985,7 +985,11 @@
validNameRegexp = new QRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
QString baseDir = QFile::decodeName(args->getOption("directory"));
+#ifdef Q_OS_WIN
+ if (!baseDir.endsWith("/") && !baseDir.endsWith("\\"))
+#else
if (!baseDir.endsWith("/"))
+#endif
baseDir.append("/");
QString inputFilename = args->url( 0 ).path();
@@ -1131,7 +1135,7 @@
QFile header( baseDir + headerFileName );
if ( !header.open( QIODevice::WriteOnly ) ) {
- kdError() << "Can't open '" << headerFileName << "for writing." << endl;
+ kdError() << "Can't open '" << baseDir << headerFileName << "for writing." << endl;
return 1;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic