[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2009-02-22 12:06:40
Message-ID: 1235304400.313356.22232.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 929858 by chehrlic:

some fixes for windows

 M  +5 -1      io/kurl.cpp  
 M  +7 -2      tests/kconfigtest.cpp  
 M  +1 -1      tests/klockfiletest.cpp  


--- trunk/KDE/kdelibs/kdecore/io/kurl.cpp #929857:929858
@@ -370,7 +370,11 @@
   if ( !str.isEmpty() ) {
 #ifdef Q_WS_WIN
     kDebug(126) << "KUrl::KUrl ( const QString &str = " << str.toAscii().data() << " \
                )";
-    QString pathToSet( removeSlashOrFilePrefix( QDir::fromNativeSeparators(str) ) );
+    QString pathToSet;
+    // when it starts with file:// it's a url and must be valid. we don't care if \
the +    // path exist/ is valid or not
+    if (!str.startsWith(QLatin1String("file://")))
+      pathToSet = removeSlashOrFilePrefix( QDir::fromNativeSeparators(str) );
     if ( !pathToSet.isEmpty() ) {
       // we have a prefix indicating this is a local URL
       // remember the possible query using _setEncodedUrl(), then set up the correct \
                path without query protocol part
--- trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp #929857:929858
@@ -1171,8 +1171,13 @@
 
     // Check we wrote into kdeglobals
     const QList<QByteArray> lines = readLines("kdeglobals");
-    QVERIFY(lines.contains("[General]\n"));
-    QVERIFY(lines.contains("testKG=1\n"));
+#ifdef Q_WS_WIN
+#define LINEENDING "\r\n"
+#else
+#define LINEENDING "\n"
+#endif
+    QVERIFY(lines.contains("[General]"LINEENDING));
+    QVERIFY(lines.contains("testKG=1"LINEENDING));
 
     // Writing using NoGlobals
     {
--- trunk/KDE/kdelibs/kdecore/tests/klockfiletest.cpp #929857:929858
@@ -98,7 +98,7 @@
 Test_KLockFile::testStaleNoBlockFlag()
 {
 #ifdef Q_WS_WIN
-    QSKIP("lockfile on windows has different format",QTest::SkipSingle);
+    QSKIP("lockfile on windows has different format",SkipSingle);
 #else
     char hostname[256];
     ::gethostname(hostname, sizeof(hostname));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic