Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Ark
Commits
86b9fbee
Commit
86b9fbee
authored
Jun 01, 2021
by
Laurent Montel
😁
Browse files
Remove check about qt version
parent
49a032e5
Changes
14
Hide whitespace changes
Inline
Side-by-side
app/batchextract.cpp
View file @
86b9fbee
...
...
@@ -32,7 +32,6 @@
#include "jobs.h"
#include "queries.h"
#include <kcoreaddons_version.h>
#include <KIO/JobTracker>
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
...
...
@@ -72,11 +71,7 @@ void BatchExtract::addExtraction(const QUrl& url)
m_fileNames
[
job
]
=
qMakePair
(
url
.
toLocalFile
(),
destination
);
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 80, 0)
connect
(
job
,
SIGNAL
(
percent
(
KJob
*
,
ulong
)),
this
,
SLOT
(
forwardProgress
(
KJob
*
,
ulong
)));
#else
connect
(
job
,
&
KJob
::
percentChanged
,
this
,
&
BatchExtract
::
forwardProgress
);
#endif
connect
(
job
,
&
Kerfuffle
::
BatchExtractJob
::
userQuery
,
this
,
&
BatchExtract
::
slotUserQuery
);
...
...
app/compressfileitemaction.cpp
View file @
86b9fbee
...
...
@@ -32,8 +32,6 @@
#include <KPluginFactory>
#include <KService>
#include <kio_version.h>
#include <algorithm>
#include <KIO/OpenFileManagerWindowJob>
#include <QDir>
...
...
@@ -127,9 +125,7 @@ QAction *CompressFileItemAction::createAction(const QIcon& icon, const QString&
if
(
addToArchiveJob
->
error
()
==
0
)
{
KIO
::
highlightInFileManager
({
QUrl
::
fromLocalFile
(
addToArchiveJob
->
fileName
())});
}
else
if
(
!
addToArchiveJob
->
errorString
().
isEmpty
())
{
#if KIO_VERSION >= QT_VERSION_CHECK(5, 82, 0)
Q_EMIT
error
(
addToArchiveJob
->
errorString
());
#endif
}
});
});
...
...
app/extractfileitemaction.cpp
View file @
86b9fbee
...
...
@@ -31,8 +31,6 @@
#include <KPluginFactory>
#include <KService>
#include <kio_version.h>
#include "mimetypes.h"
#include "pluginmanager.h"
#include "batchextract.h"
...
...
@@ -130,9 +128,7 @@ QAction *ExtractFileItemAction::createAction(const QIcon& icon, const QString& n
batchExtractJob
->
start
();
connect
(
batchExtractJob
,
&
KJob
::
finished
,
this
,
[
this
,
batchExtractJob
](){
if
(
!
batchExtractJob
->
errorString
().
isEmpty
())
{
#if KIO_VERSION >= QT_VERSION_CHECK(5, 82, 0)
Q_EMIT
error
(
batchExtractJob
->
errorString
());
#endif
}
});
});
...
...
autotests/plugins/cli7zplugin/cli7ztest.cpp
View file @
86b9fbee
...
...
@@ -232,9 +232,7 @@ void Cli7zTest::testList()
QCOMPARE
(
entry
->
property
(
"size"
).
toULongLong
(),
expectedSize
);
QFETCH
(
QString
,
expectedTimestamp
);
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QEXPECT_FAIL
(
""
,
"Something changed since Qt 5.11, needs investigation."
,
Continue
);
#endif
QCOMPARE
(
entry
->
property
(
"timestamp"
).
toString
(),
expectedTimestamp
);
plugin
->
deleteLater
();
...
...
autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp
View file @
86b9fbee
...
...
@@ -189,9 +189,7 @@ void CliUnarchiverTest::testList()
QCOMPARE
(
entry
->
property
(
"compressedSize"
).
toULongLong
(),
expectedCompressedSize
);
QFETCH
(
QString
,
expectedTimestamp
);
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
QEXPECT_FAIL
(
""
,
"Something changed since Qt 5.11, needs investigation."
,
Continue
);
#endif
QCOMPARE
(
entry
->
property
(
"timestamp"
).
toString
(),
expectedTimestamp
);
plugin
->
deleteLater
();
...
...
kerfuffle/archive_kerfuffle.h
View file @
86b9fbee
...
...
@@ -244,8 +244,4 @@ private:
}
// namespace Kerfuffle
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5,60,0)
Q_DECLARE_METATYPE
(
KPluginMetaData
)
#endif
#endif // ARCHIVE_H
kerfuffle/archiveinterface.cpp
View file @
86b9fbee
...
...
@@ -214,11 +214,7 @@ QStringList ReadOnlyArchiveInterface::entryPathsFromDestination(QStringList entr
}
newPath
=
destinationPath
+
entryPath
.
right
(
charsCount
);
}
else
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QString
name
=
entryPath
.
split
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
).
last
();
#else
const
QString
name
=
entryPath
.
split
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
).
last
();
#endif
if
(
entriesWithoutChildren
!=
1
)
{
newPath
=
destinationPath
+
name
;
if
(
entryPath
.
right
(
1
)
==
QLatin1String
(
"/"
))
{
...
...
kerfuffle/cliinterface.cpp
View file @
86b9fbee
...
...
@@ -182,11 +182,7 @@ bool CliInterface::addFiles(const QVector<Archive::Entry*> &files, const Archive
qCDebug
(
ARK
)
<<
"Changing working dir again to "
<<
m_extractTempDir
->
path
();
QDir
::
setCurrent
(
m_extractTempDir
->
path
());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
filesToPass
.
push_back
(
new
Archive
::
Entry
(
preservedParent
,
destinationPath
.
split
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
).
at
(
0
)));
#else
filesToPass
.
push_back
(
new
Archive
::
Entry
(
preservedParent
,
destinationPath
.
split
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
).
at
(
0
)));
#endif
}
else
{
filesToPass
=
files
;
}
...
...
kerfuffle/qstringtokenizer.h
View file @
86b9fbee
...
...
@@ -165,10 +165,8 @@ namespace Tok {
template
<
>
struct
ViewForImpl
<
char16_t
>
:
ViewForImpl
<
QChar
>
{};
template
<
>
struct
ViewForImpl
<
char16_t
*>
:
ViewForImpl
<
QStringView
>
{};
template
<
>
struct
ViewForImpl
<
const
char16_t
*>
:
ViewForImpl
<
QStringView
>
{};
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
template
<
typename
LHS
,
typename
RHS
>
struct
ViewForImpl
<
QStringBuilder
<
LHS
,
RHS
>>
:
ViewForImpl
<
typename
QStringBuilder
<
LHS
,
RHS
>::
ConvertTo
>
{};
#endif
template
<
typename
Char
,
typename
...
Args
>
struct
ViewForImpl
<
std
::
basic_string
<
Char
,
Args
...
>>
:
ViewForImpl
<
Char
*>
{};
#ifdef __cpp_lib_string_view
...
...
part/archivemodel.cpp
View file @
86b9fbee
...
...
@@ -429,11 +429,7 @@ void ArchiveModel::slotEntryRemoved(const QString & path)
return
;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
Archive
::
Entry
*
entry
=
m_rootEntry
->
findByPath
(
entryFileName
.
split
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
));
#else
Archive
::
Entry
*
entry
=
m_rootEntry
->
findByPath
(
entryFileName
.
split
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
));
#endif
if
(
entry
)
{
Archive
::
Entry
*
parent
=
entry
->
getParent
();
QModelIndex
index
=
indexForEntry
(
entry
);
...
...
@@ -730,11 +726,7 @@ bool ArchiveModel::conflictingEntries(QList<const Archive::Entry*> &conflictingE
// We can't accept destination as an argument, because it can be a new entry path for renaming.
const
Archive
::
Entry
*
destination
;
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
destinationParts
=
entries
.
first
().
split
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
);
#else
QStringList
destinationParts
=
entries
.
first
().
split
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
);
#endif
destinationParts
.
removeLast
();
if
(
destinationParts
.
count
()
>
0
)
{
destination
=
m_rootEntry
->
findByPath
(
destinationParts
);
...
...
@@ -757,11 +749,7 @@ bool ArchiveModel::conflictingEntries(QList<const Archive::Entry*> &conflictingE
}
bool
isDir
=
entry
.
right
(
1
)
==
QLatin1String
(
"/"
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
Archive
::
Entry
*
archiveEntry
=
lastDirEntry
->
find
(
entry
.
split
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
).
last
());
#else
const
Archive
::
Entry
*
archiveEntry
=
lastDirEntry
->
find
(
entry
.
split
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
).
last
());
#endif
if
(
archiveEntry
!=
nullptr
)
{
if
(
archiveEntry
->
isDir
()
!=
isDir
||
!
allowMerging
)
{
...
...
part/infopanel.cpp
View file @
86b9fbee
...
...
@@ -125,11 +125,7 @@ void InfoPanel::setIndex(const QModelIndex& index)
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
nameParts
=
entry
->
fullPath
().
split
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
nameParts
=
entry
->
fullPath
().
split
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
);
#endif
const
QString
name
=
(
nameParts
.
count
()
>
0
)
?
nameParts
.
last
()
:
entry
->
fullPath
();
fileName
->
setText
(
name
);
...
...
plugins/cli7zplugin/cliplugin.cpp
View file @
86b9fbee
...
...
@@ -185,11 +185,7 @@ bool CliPlugin::readListLine(const QString& line)
m_numberOfVolumes
=
line
.
section
(
QLatin1Char
(
'='
),
1
).
trimmed
().
toInt
();
}
else
if
(
line
.
startsWith
(
QLatin1String
(
"Method = "
)))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
methods
=
line
.
section
(
QLatin1Char
(
'='
),
1
).
trimmed
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
methods
=
line
.
section
(
QLatin1Char
(
'='
),
1
).
trimmed
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
handleMethods
(
methods
);
}
else
if
(
line
.
startsWith
(
QLatin1String
(
"Comment = "
)))
{
...
...
@@ -268,11 +264,7 @@ bool CliPlugin::readListLine(const QString& line)
// For zip archives we need to check method for each entry.
if
(
m_archiveType
==
ArchiveTypeZip
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
methods
=
line
.
section
(
QLatin1Char
(
'='
),
1
).
trimmed
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
methods
=
line
.
section
(
QLatin1Char
(
'='
),
1
).
trimmed
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
handleMethods
(
methods
);
}
...
...
plugins/cliplugin-example/cliplugin.cpp
View file @
86b9fbee
...
...
@@ -109,11 +109,7 @@ bool CliPlugin::readListLine(const QString &line)
return
true
;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
fileprops
=
line
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
fileprops
=
line
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
m_entryFilename
=
QDir
::
fromNativeSeparators
(
m_entryFilename
);
bool
isDirectory
=
(
bool
)(
fileprops
[
5
].
contains
(
QLatin1Char
(
'd'
),
Qt
::
CaseInsensitive
));
...
...
plugins/clirarplugin/cliplugin.cpp
View file @
86b9fbee
...
...
@@ -457,11 +457,7 @@ bool CliPlugin::handleUnrar4Line(const QString &line)
// pass a QStringList containing the details. We need to store
// it due to symlinks (see below).
m_unrar4Details
.
append
(
line
.
split
(
QLatin1Char
(
' '
),
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QString
::
SkipEmptyParts
));
#else
Qt
::
SkipEmptyParts
));
#endif
// The details line contains 9 fields, so m_unrar4Details
// should now contain 9 + the filename = 10 strings. If not, this is
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment