Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Add-ons
Commits
89ee12f8
Commit
89ee12f8
authored
Oct 09, 2020
by
Alexander Lohnau
💬
Browse files
Remove obsolete Qt version check
parent
6bfbece5
Changes
9
Hide whitespace changes
Inline
Side-by-side
applets/comic/comicarchivejob.cpp
View file @
89ee12f8
...
...
@@ -136,11 +136,7 @@ void ComicArchiveJob::dataUpdated( const QString &source, const Plasma::DataEngi
const
QString
nextIdentifierSuffix
=
data
[
QStringLiteral
(
"Next identifier suffix"
)].
toString
();
const
QString
firstIdentifierSuffix
=
data
[
QStringLiteral
(
"First strip identifier suffix"
)].
toString
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
mAuthors
<<
data
[
QStringLiteral
(
"Comic Author"
)].
toString
().
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
mAuthors
<<
data
[
QStringLiteral
(
"Comic Author"
)].
toString
().
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
mAuthors
.
removeDuplicates
();
if
(
mComicTitle
.
isEmpty
()
)
{
...
...
applets/diskquota/plugin/DiskQuota.cpp
View file @
89ee12f8
...
...
@@ -185,11 +185,7 @@ void DiskQuota::quotaProcessFinished(int exitCode, QProcess::ExitStatus exitStat
const
QString
rawData
=
QString
::
fromLocal8Bit
(
m_quotaProcess
->
readAllStandardOutput
());
// qDebug() << rawData;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
lines
=
rawData
.
split
(
QRegularExpression
(
QStringLiteral
(
"[
\r\n
]"
)),
QString
::
SkipEmptyParts
);
#else
const
QStringList
lines
=
rawData
.
split
(
QRegularExpression
(
QStringLiteral
(
"[
\r\n
]"
)),
Qt
::
SkipEmptyParts
);
#endif
// Testing
// QStringList lines = QStringList()
// << QStringLiteral("/home/peterpan 3975379* 5000000 7000000 57602 0 0")
...
...
@@ -212,11 +208,7 @@ void DiskQuota::quotaProcessFinished(int exitCode, QProcess::ExitStatus exitStat
continue
;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
parts
=
line
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
parts
=
line
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
// valid lines range from 7 to 9 parts (grace not always there):
// Disk quotas for user dh (uid 1000):
// Filesystem blocks quota limit grace files quota limit grace
...
...
applets/weather/plugin/locationlistmodel.cpp
View file @
89ee12f8
...
...
@@ -196,11 +196,7 @@ void LocationListModel::addSources(const QMap<QString, QString> &sources)
while
(
it
.
hasNext
())
{
it
.
next
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
list
=
it
.
value
().
split
(
QLatin1Char
(
'|'
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
list
=
it
.
value
().
split
(
QLatin1Char
(
'|'
),
Qt
::
SkipEmptyParts
);
#endif
if
(
list
.
count
()
>
2
)
{
qDebug
()
<<
list
;
m_locations
.
append
(
LocationItem
(
list
[
2
],
list
[
0
],
it
.
value
()));
...
...
dataengines/comic/comic.cpp
View file @
89ee12f8
...
...
@@ -83,11 +83,7 @@ bool ComicEngine::updateSourceEvent(const QString &identifier)
return
true
;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
parts
=
identifier
.
split
(
QLatin1Char
(
':'
),
QString
::
KeepEmptyParts
);
#else
const
QStringList
parts
=
identifier
.
split
(
QLatin1Char
(
':'
),
Qt
::
KeepEmptyParts
);
#endif
// check whether it is cached, make sure second part present
if
(
parts
.
count
()
>
1
&&
CachedProvider
::
isCached
(
identifier
))
{
...
...
dataengines/potd/potd.cpp
View file @
89ee12f8
...
...
@@ -80,11 +80,7 @@ bool PotdEngine::updateSource( const QString &identifier, bool loadCachedAlways
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
parts
=
identifier
.
split
(
QLatin1Char
(
':'
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
parts
=
identifier
.
split
(
QLatin1Char
(
':'
),
Qt
::
SkipEmptyParts
);
#endif
if
(
parts
.
empty
())
{
qDebug
()
<<
"invalid identifier"
;
return
false
;
...
...
runners/converter/converterrunner.cpp
View file @
89ee12f8
...
...
@@ -143,11 +143,7 @@ QPair<bool, double> ConverterRunner::stringToDouble(const QStringRef &value)
QPair
<
bool
,
double
>
ConverterRunner
::
getValidatedNumberValue
(
const
QString
&
value
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
auto
fractionParts
=
value
.
splitRef
(
QLatin1Char
(
'/'
),
QString
::
SkipEmptyParts
);
#else
const
auto
fractionParts
=
value
.
splitRef
(
QLatin1Char
(
'/'
),
Qt
::
SkipEmptyParts
);
#endif
if
(
fractionParts
.
isEmpty
()
||
fractionParts
.
count
()
>
2
)
{
return
{
false
,
0
};
}
...
...
runners/dictionary/dictionarymatchengine.cpp
View file @
89ee12f8
...
...
@@ -8,9 +8,8 @@
#include
<QThread>
#include
<QMetaMethod>
#include
<QDebug>
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
#include
<QDeadlineTimer>
#endif
DictionaryMatchEngine
::
DictionaryMatchEngine
(
Plasma
::
DataEngine
*
dictionaryEngine
,
QObject
*
parent
)
:
QObject
(
parent
),
m_dictionaryEngine
(
dictionaryEngine
)
...
...
@@ -42,11 +41,7 @@ QString DictionaryMatchEngine::lookupWord(const QString &word)
QMetaObject
::
invokeMethod
(
this
,
"sourceAdded"
,
Qt
::
QueuedConnection
,
Q_ARG
(
const
QString
&
,
word
));
QMutexLocker
locker
(
&
data
.
mutex
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
if
(
!
data
.
waitCondition
.
wait
(
&
data
.
mutex
,
30
*
1000
))
// Timeout after 30 seconds
#else
if
(
!
data
.
waitCondition
.
wait
(
&
data
.
mutex
,
QDeadlineTimer
(
30
*
1000
)))
// Timeout after 30 seconds
#endif
qDebug
()
<<
"The dictionary data engine timed out (word:"
<<
word
<<
")"
;
locker
.
unlock
();
...
...
runners/dictionary/dictionaryrunner.cpp
View file @
89ee12f8
...
...
@@ -55,11 +55,7 @@ void DictionaryRunner::match(Plasma::RunnerContext &context)
definitions
.
remove
(
QLatin1Char
(
'\r'
)).
remove
(
removeHtml
);
while
(
definitions
.
contains
(
QLatin1String
(
" "
)))
definitions
.
replace
(
QLatin1String
(
" "
),
QLatin1String
(
" "
));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
lines
=
definitions
.
split
(
QLatin1Char
(
'\n'
),
QString
::
SkipEmptyParts
);
#else
QStringList
lines
=
definitions
.
split
(
QLatin1Char
(
'\n'
),
Qt
::
SkipEmptyParts
);
#endif
if
(
lines
.
length
()
<
2
)
return
;
lines
.
removeFirst
();
...
...
runners/spellchecker/spellcheck.cpp
View file @
89ee12f8
...
...
@@ -186,11 +186,7 @@ void SpellCheckRunner::match(Plasma::RunnerContext &context)
QSharedPointer
<
Sonnet
::
Speller
>
speller
=
m_spellers
[
QString
()];
if
(
speller
->
isValid
())
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
terms
=
query
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
terms
=
query
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
const
QString
lang
=
findLang
(
terms
);
//If we found a language, create a new speller object using it.
if
(
!
lang
.
isEmpty
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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