/*!
\reimp
*/
-void QBuffer::close()
-{
- QIODevice::close();
-}
-
-/*!
- \reimp
-*/
-qint64 QBuffer::pos() const
-{
- return QIODevice::pos();
-}
-
-/*!
- \reimp
-*/
qint64 QBuffer::size() const
{
Q_D(const QBuffer);
}
/*!
- \reimp
-*/
-bool QBuffer::atEnd() const
-{
- return QIODevice::atEnd();
-}
-
-/*!
\reimp
*/
bool QBuffer::canReadLine() const
bool open(OpenMode openMode);
- void close();
qint64 size() const;
- qint64 pos() const;
bool seek(qint64 off);
- bool atEnd() const;
bool canReadLine() const;
protected:
}
/*!
- \reimp
-*/
-
-qint64 QFile::pos() const
-{
- return QIODevice::pos();
-}
-
-/*!
Returns true if the end of the file has been reached; otherwise returns
false.
virtual void close();
qint64 size() const;
- qint64 pos() const;
bool seek(qint64 offset);
bool atEnd() const;
bool flush();
size() to get its size.
The file's type is obtained with isFile(), isDir() and
- isSymLink(). The symLinkTarget() function provides the name of the file
+ isSymLink(). The readLink() function provides the name of the file
the symlink points to.
On Unix (including Mac OS X), the symlink has the same size() has
*/
/*!
- \overload
+ Returns true if this QFileInfo object refers to a file in the same
+ location as \a fileinfo; otherwise returns false.
+
+ Note that the result of comparing two empty QFileInfo objects,
+ containing no file references, is undefined.
+
+ \warning This will not compare two different symbolic links
+ pointing to the same file.
+
+ \warning Long and short file names that refer to the same file on Windows
+ are treated as if they referred to different files.
+
+ \sa operator!=()
*/
bool QFileInfo::operator==(const QFileInfo &fileinfo) const
{
}
/*!
- Returns true if this QFileInfo object refers to a file in the same
- location as \a fileinfo; otherwise returns false.
-
- Note that the result of comparing two empty QFileInfo objects,
- containing no file references, is undefined.
-
- \warning This will not compare two different symbolic links
- pointing to the same file.
-
- \warning Long and short file names that refer to the same file on Windows
- are treated as if they referred to different files.
-
- \sa operator!=()
-*/
-bool QFileInfo::operator==(const QFileInfo &fileinfo)
-{
- return const_cast<const QFileInfo *>(this)->operator==(fileinfo);
-}
-
-/*!
Makes a copy of the given \a fileinfo and assigns it to this QFileInfo.
*/
QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo)
shortcut on Windows); otherwise returns false.
On Unix (including Mac OS X), opening a symlink effectively opens
- the \l{symLinkTarget()}{link's target}. On Windows, it opens the \c
+ the \l{readLink()}{link's target}. On Windows, it opens the \c
.lnk file itself.
Example:
\note If the symlink points to a non existing file, exists() returns
false.
- \sa isFile(), isDir(), symLinkTarget()
+ \sa isFile(), isDir(), readLink()
*/
bool QFileInfo::isSymLink() const
{
inline QFileInfo&operator=(QFileInfo &&other)
{ qSwap(d_ptr, other.d_ptr); return *this; }
#endif
- bool operator==(const QFileInfo &fileinfo); // 5.0 - remove me
bool operator==(const QFileInfo &fileinfo) const;
- inline bool operator!=(const QFileInfo &fileinfo) { return !(operator==(fileinfo)); } // 5.0 - remove me
inline bool operator!=(const QFileInfo &fileinfo) const { return !(operator==(fileinfo)); }
void setFile(const QString &file);
bool isBundle() const;
QString readLink() const;
- inline QString symLinkTarget() const { return readLink(); }
QString owner() const;
uint ownerId() const;
!nonSymlinks.contains(prefix)) {
fi.setFile(prefix);
if (fi.isSymLink()) {
- QString target = fi.symLinkTarget();
+ QString target = fi.readLink();
if(QFileInfo(target).isRelative())
target = fi.absolutePath() + slash + target;
if (separatorPos != -1) {
the subset that the win/unix kernel allows.
On Unix this will be a file name
- On Symbian key will be truncated to 80 characters
*/
QString
QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
enum Algorithm {
Md4,
Md5,
- Sha1 = 2,
+ Sha1,
Sha224,
Sha256,
Sha384,
for (QFileInfoList::const_iterator it = infoList.constBegin(); it != icend; ++it) {
QString fileName;
if (it->isSymLink()) {
- const QFileInfo linkTarget = QFileInfo(it->symLinkTarget());
+ const QFileInfo linkTarget = QFileInfo(it->readLink());
if (linkTarget.exists() && linkTarget.isFile())
fileName = linkTarget.absoluteFilePath();
} else {
#endif
if (m_resolveSymlinks && info.isSymLink(/* ignoreNtfsSymLinks = */ true)) {
- QFileInfo resolvedInfo(fileInfo.symLinkTarget());
+ QFileInfo resolvedInfo(fileInfo.readLink());
resolvedInfo = resolvedInfo.canonicalFilePath();
if (resolvedInfo.exists()) {
emit nameResolved(fileInfo.filePath(), resolvedInfo.fileName());
information about the symbolic link itself, regardless of whether
resolveSymlinks is enabled or not.
- \sa QFileInfo::symLinkTarget()
+ \sa QFileInfo::readLink()
*/
QFileInfo QDirModel::fileInfo(const QModelIndex &index) const
} else if (parent->info.isDir()) {
//resolve directory links only if requested.
if (parent->info.isSymLink() && resolveSymlinks) {
- QString link = parent->info.symLinkTarget();
+ QString link = parent->info.readLink();
if (link.size() > 1 && link.at(link.size() - 1) == QDir::separator())
link.chop(1);
if (stat)
{
#ifdef Q_OS_WIN
// On windows, we cannot create a shortcut to a shortcut.
- return QFileInfo(info.symLinkTarget());
+ return QFileInfo(info.readLink());
#else
QStringList paths;
do {
- QFileInfo link(info.symLinkTarget());
+ QFileInfo link(info.readLink());
if (link.isRelative())
info.setFile(info.absolutePath(), link.filePath());
else
const QString parentProc = QLatin1String("/proc/") + QString::number(getppid());
const QFileInfo parentProcExe(parentProc + QLatin1String("/exe"));
if (parentProcExe.isSymLink())
- return parentProcExe.symLinkTarget().endsWith(QLatin1String("/gdb"));
+ return parentProcExe.readLink().endsWith(QLatin1String("/gdb"));
QFile f(parentProc + QLatin1String("/cmdline"));
if (!f.open(QIODevice::ReadOnly))
return false;
#include <qplatformdefs.h>
#include <qabstractspinbox_p.h>
-#include <qdatetime_p.h>
#include <qlineedit_p.h>
#include <qabstractspinbox.h>