summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-07-02 00:41:28 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-07-07 18:40:30 +0000
commit0b7d9d28119d27bd6ccb277876f4d904d1d7afcb (patch)
tree854b1ff3acb40291afcac38e1e265a9a7881d2d1 /src
parent1b73c202ce907cd03864413f472bfeb5abf5151e (diff)
QAbstractFileEngine: make setFileTime not a pure virtual
Most engines just had to override the virtual to return false. So do it in the base class. Change-Id: I8d96dea9955d4c749b99fffd14cd738a48aa818c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qabstractfileengine.cpp10
-rw-r--r--src/corelib/io/qabstractfileengine_p.h2
-rw-r--r--src/corelib/io/qresource.cpp7
-rw-r--r--src/corelib/io/qresource_p.h1
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp7
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h1
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm7
-rw-r--r--src/plugins/platforms/winrt/qwinrtfileengine.cpp8
-rw-r--r--src/plugins/platforms/winrt/qwinrtfileengine.h1
9 files changed, 9 insertions, 35 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 85dc2f33a2..169e933546 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -726,10 +726,10 @@ QString QAbstractFileEngine::owner(FileOwner owner) const
return QString();
}
-/*!
- \fn bool QAbstractFileEngine::setFileTime(const QDateTime &newDate, FileTime time)
+/*!
\since 5.10
+
Sets the file \a time to \a newDate, returning true if successful;
otherwise returns false.
@@ -737,6 +737,12 @@ QString QAbstractFileEngine::owner(FileOwner owner) const
\sa fileTime()
*/
+bool QAbstractFileEngine::setFileTime(const QDateTime &newDate, FileTime time)
+{
+ Q_UNUSED(newDate);
+ Q_UNUSED(time);
+ return false;
+}
/*!
If \a time is \c CreationTime, return when the file was created.
diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h
index 9d0a101b49..5685a39e81 100644
--- a/src/corelib/io/qabstractfileengine_p.h
+++ b/src/corelib/io/qabstractfileengine_p.h
@@ -144,7 +144,7 @@ public:
virtual QString fileName(FileName file=DefaultName) const;
virtual uint ownerId(FileOwner) const;
virtual QString owner(FileOwner) const;
- virtual bool setFileTime(const QDateTime &newDate, FileTime time) = 0;
+ virtual bool setFileTime(const QDateTime &newDate, FileTime time);
virtual QDateTime fileTime(FileTime time) const;
virtual void setFileName(const QString &file);
virtual int handle() const;
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index ff31524c1c..984ed23812 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -1457,13 +1457,6 @@ QString QResourceFileEngine::owner(FileOwner) const
return QString();
}
-bool QResourceFileEngine::setFileTime(const QDateTime &newDate, FileTime time)
-{
- Q_UNUSED(newDate);
- Q_UNUSED(time);
- return false;
-}
-
QDateTime QResourceFileEngine::fileTime(FileTime time) const
{
Q_D(const QResourceFileEngine);
diff --git a/src/corelib/io/qresource_p.h b/src/corelib/io/qresource_p.h
index 1b0f4f66e4..e08ba64d2b 100644
--- a/src/corelib/io/qresource_p.h
+++ b/src/corelib/io/qresource_p.h
@@ -103,7 +103,6 @@ public:
virtual uint ownerId(FileOwner) const Q_DECL_OVERRIDE;
virtual QString owner(FileOwner) const Q_DECL_OVERRIDE;
- virtual bool setFileTime(const QDateTime &newDate, FileTime time) Q_DECL_OVERRIDE;
virtual QDateTime fileTime(FileTime time) const Q_DECL_OVERRIDE;
virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) Q_DECL_OVERRIDE;
diff --git a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
index 953377a3a9..e1dcebfa4c 100644
--- a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
+++ b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
@@ -206,13 +206,6 @@ public:
return type & flags;
}
- bool setFileTime(const QDateTime &newDate, FileTime time) override
- {
- Q_UNUSED(newDate);
- Q_UNUSED(time);
- return false;
- }
-
QString fileName(FileName file = DefaultName) const override
{
int pos;
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
index 2387efc1f9..8d7cabf15b 100644
--- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
@@ -61,7 +61,6 @@ public:
qint64 read(char *data, qint64 maxlen) override;
qint64 pos() const override;
bool seek(qint64 pos) override;
- bool setFileTime(const QDateTime &newDate, FileTime time) override;
QString fileName(FileName file) const override;
void setFileName(const QString &file) override;
QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override;
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
index fce257356f..bea2897240 100644
--- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
@@ -435,13 +435,6 @@ bool QIOSFileEngineAssetsLibrary::seek(qint64 pos)
return true;
}
-bool QIOSFileEngineAssetsLibrary::setFileTime(const QDateTime &newDate, FileTime time)
-{
- Q_UNUSED(newDate);
- Q_UNUSED(time);
- return false;
-}
-
QString QIOSFileEngineAssetsLibrary::fileName(FileName file) const
{
Q_UNUSED(file);
diff --git a/src/plugins/platforms/winrt/qwinrtfileengine.cpp b/src/plugins/platforms/winrt/qwinrtfileengine.cpp
index f2f8b83e16..dab2482ab3 100644
--- a/src/plugins/platforms/winrt/qwinrtfileengine.cpp
+++ b/src/plugins/platforms/winrt/qwinrtfileengine.cpp
@@ -440,14 +440,6 @@ QDateTime QWinRTFileEngine::fileTime(FileTime type) const
return QDateTime(date, time);
}
-bool QWinRTFileEngine::setFileTime(const QDateTime &newDate, FileTime time)
-{
- Q_UNUSED(newDate);
- Q_UNUSED(time);
- Q_UNIMPLEMENTED();
- return false;
-}
-
qint64 QWinRTFileEngine::read(char *data, qint64 maxlen)
{
Q_D(QWinRTFileEngine);
diff --git a/src/plugins/platforms/winrt/qwinrtfileengine.h b/src/plugins/platforms/winrt/qwinrtfileengine.h
index 5db83360ce..73ff54b0c8 100644
--- a/src/plugins/platforms/winrt/qwinrtfileengine.h
+++ b/src/plugins/platforms/winrt/qwinrtfileengine.h
@@ -89,7 +89,6 @@ public:
bool setPermissions(uint perms) override;
QString fileName(FileName type=DefaultName) const override;
QDateTime fileTime(FileTime type) const override;
- bool setFileTime(const QDateTime &newDate, FileTime time) override;
qint64 read(char *data, qint64 maxlen) override;
qint64 write(const char *data, qint64 len) override;