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 Browser Integration
Commits
e97df376
Commit
e97df376
authored
Jan 12, 2021
by
Kai Uwe Broulik
🍇
Browse files
Port from Settings::environmentDescription().icon to qApp->windowIcon().name()
parent
52b41d15
Changes
4
Hide whitespace changes
Inline
Side-by-side
host/historyrunnerplugin.cpp
View file @
e97df376
...
...
@@ -21,7 +21,9 @@
#include
"settings.h"
#include
<QDBusConnection>
#include
<QGuiApplication>
#include
<QJsonArray>
#include
<QIcon>
#include
<QImage>
#include
<QSet>
#include
<QUrl>
...
...
@@ -117,7 +119,7 @@ void HistoryRunnerPlugin::handleData(const QString& event, const QJsonObject& js
match
.
type
=
Plasma
::
QueryMatch
::
NoMatch
;
match
.
relevance
=
0
;
match
.
text
=
i18nc
(
"Dummy search result"
,
"Additional permissions are required"
);
match
.
iconName
=
Settings
::
self
().
environmentDescription
().
iconN
ame
;
match
.
iconName
=
qApp
->
windowIcon
().
n
ame
()
;
matches
.
append
(
match
);
}
else
{
const
QJsonArray
results
=
json
.
value
(
QStringLiteral
(
"results"
)).
toArray
();
...
...
@@ -159,7 +161,7 @@ void HistoryRunnerPlugin::handleData(const QString& event, const QJsonObject& js
}
else
{
match
.
text
=
url
.
toDisplayString
();
}
match
.
iconName
=
Settings
::
self
().
environmentDescription
().
iconN
ame
;
match
.
iconName
=
qApp
->
windowIcon
().
n
ame
()
;
QUrl
urlWithoutPassword
=
url
;
urlWithoutPassword
.
setPassword
({});
...
...
host/settings.cpp
View file @
e97df376
...
...
@@ -292,11 +292,6 @@ Settings::Environment Settings::environment() const
return
m_environment
;
}
EnvironmentDescription
Settings
::
environmentDescription
()
const
{
return
m_currentEnvironment
;
}
bool
Settings
::
pluginEnabled
(
const
QString
&
subsystem
)
const
{
return
settingsForPlugin
(
subsystem
).
value
(
QStringLiteral
(
"enabled"
)).
toBool
();
...
...
host/settings.h
View file @
e97df376
...
...
@@ -68,8 +68,6 @@ public:
QJsonObject
handleData
(
int
serial
,
const
QString
&
event
,
const
QJsonObject
&
data
)
override
;
Environment
environment
()
const
;
// TODO remove and migrate runners to use qApp->windowIcon().name()
EnvironmentDescription
environmentDescription
()
const
;
bool
pluginEnabled
(
const
QString
&
subsystem
)
const
;
QJsonObject
settingsForPlugin
(
const
QString
&
subsystem
)
const
;
...
...
host/tabsrunnerplugin.cpp
View file @
e97df376
...
...
@@ -26,7 +26,9 @@
#include
"connection.h"
#include
<QDBusConnection>
#include
<QGuiApplication>
#include
<QHash>
#include
<QIcon>
#include
<QImage>
#include
<QJsonArray>
#include
<QJsonObject>
...
...
@@ -188,7 +190,7 @@ void TabsRunnerPlugin::handleData(const QString& event, const QJsonObject& json)
actions
.
append
(
s_actionIdMute
);
}
}
else
{
match
.
iconName
=
Settings
::
self
().
environmentDescription
().
iconN
ame
;
match
.
iconName
=
qApp
->
windowIcon
().
n
ame
()
;
const
QImage
favIcon
=
imageFromDataUrl
(
tab
.
value
(
QStringLiteral
(
"favIconData"
)).
toString
());
if
(
!
favIcon
.
isNull
())
{
...
...
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