mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix a couple more Qt 5.15 deprecation warnings (#10953)
* More {QString->Qt}::SkipEmptyParts * QProcess::start: non-deprecated overload
This commit is contained in:
parent
6b1ab1a5ed
commit
198889c7a4
@ -443,7 +443,7 @@ int Entry::size() const
|
||||
size += autoTypeAssociations()->associationsSize();
|
||||
size += attachments()->attachmentsSize();
|
||||
size += customData()->dataSize();
|
||||
for (const QString& tag : tags().split(TagDelimiterRegex, QString::SkipEmptyParts)) {
|
||||
for (const QString& tag : tags().split(TagDelimiterRegex, Qt::SkipEmptyParts)) {
|
||||
size += tag.toUtf8().size();
|
||||
}
|
||||
|
||||
@ -672,7 +672,7 @@ void Entry::setOverrideUrl(const QString& url)
|
||||
|
||||
void Entry::setTags(const QString& tags)
|
||||
{
|
||||
auto taglist = tags.split(TagDelimiterRegex, QString::SkipEmptyParts);
|
||||
auto taglist = tags.split(TagDelimiterRegex, Qt::SkipEmptyParts);
|
||||
// Trim whitespace before/after tag text
|
||||
for (auto& tag : taglist) {
|
||||
tag = tag.trimmed();
|
||||
|
@ -36,7 +36,17 @@ void RemoteProcess::setTempFileLocation(const QString& tempFile)
|
||||
|
||||
void RemoteProcess::start(const QString& command)
|
||||
{
|
||||
m_process->start(resolveTemplateVariables(command));
|
||||
const QString commandResolved = resolveTemplateVariables(command);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
QStringList cmdList = QProcess::splitCommand(commandResolved);
|
||||
if (!cmdList.isEmpty()) {
|
||||
const QString program = cmdList.takeFirst();
|
||||
m_process->start(program, cmdList);
|
||||
}
|
||||
#else
|
||||
m_process->start(resolveTemplateVariables(commandResolved));
|
||||
#endif
|
||||
|
||||
m_process->waitForStarted();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user