diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qipaddress.cpp | 3 | ||||
-rw-r--r-- | src/corelib/io/qlockfile_p.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qlockfile_unix.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qresource.cpp | 6 |
4 files changed, 11 insertions, 3 deletions
diff --git a/src/corelib/io/qipaddress.cpp b/src/corelib/io/qipaddress.cpp index 13636ebb8b..02b12f635a 100644 --- a/src/corelib/io/qipaddress.cpp +++ b/src/corelib/io/qipaddress.cpp @@ -117,6 +117,9 @@ static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptL return false; else if (dotCount == 3 || *endptr == '\0') return true; + if (*endptr != '.') + return false; + ++dotCount; ptr = endptr + 1; } diff --git a/src/corelib/io/qlockfile_p.h b/src/corelib/io/qlockfile_p.h index b41b9b4604..d7f2a1d52d 100644 --- a/src/corelib/io/qlockfile_p.h +++ b/src/corelib/io/qlockfile_p.h @@ -81,7 +81,8 @@ public: // Returns \c true if the lock belongs to dead PID, or is old. // The attempt to delete it will tell us if it was really stale or not, though. bool isApparentlyStale() const; - static QString processNameByPid(qint64 pid); + // used in dbusmenu + Q_CORE_EXPORT static QString processNameByPid(qint64 pid); #ifdef Q_OS_UNIX static int checkFcntlWorksAfterFlock(const QString &fn); diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index 3455305858..7255414bdc 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -148,6 +148,8 @@ static QBasicMutex fcntlLock; static bool fcntlWorksAfterFlock(const QString &fn) { QMutexLocker lock(&fcntlLock); + if (fcntlOK.isDestroyed()) + return QLockFilePrivate::checkFcntlWorksAfterFlock(fn); bool *worksPtr = fcntlOK->object(fn); if (!worksPtr) { worksPtr = new bool(QLockFilePrivate::checkFcntlWorksAfterFlock(fn)); diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index ad24b43568..1ead114235 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -1259,8 +1259,10 @@ bool QResourceFileEngine::open(QIODevice::OpenMode flags) } if(flags & QIODevice::WriteOnly) return false; - if(!d->resource.isValid()) - return false; + if (!d->resource.isValid()) { + d->errorString = qt_error_string(ENOENT); + return false; + } return true; } |