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
Frameworks
KIO
Commits
55d5a1d8
Commit
55d5a1d8
authored
Aug 13, 2014
by
Eike Hein
Browse files
Run astyle-kdelibs.
parent
77a72188
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kcms/webshortcuts/main.cpp
View file @
55d5a1d8
...
...
@@ -34,10 +34,9 @@
K_PLUGIN_FACTORY
(
KURIFilterModuleFactory
,
registerPlugin
<
KURIFilterModule
>
();)
KURIFilterModule
::
KURIFilterModule
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
parent
,
args
),
m_widget
(
0
)
m_widget
(
0
)
{
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcm_webshortcuts"
),
QString
(),
i18n
(
"Web Shortcuts"
),
QStringLiteral
(
"0.1"
),
KAboutLicense
::
GPL
);
setAboutData
(
about
);
...
...
@@ -46,23 +45,22 @@ KURIFilterModule::KURIFilterModule(QWidget *parent, const QVariantList &args)
filter
=
KUriFilter
::
self
();
setQuickHelp
(
i18n
(
"<h1>Enhanced Browsing</h1> In this module you can configure some enhanced browsing"
" features of KDE. "
"<h2>Web Shortcuts</h2>Web Shortcuts are a quick way of using Web search engines. For example, type
\"
altavista:frobozz
\"
"
" or
\"
av:frobozz
\"
and Konqueror will do a search on AltaVista for
\"
frobozz
\"
."
" Even easier: just press Alt+F2 (if you have not"
" changed this shortcut) and enter the shortcut in the KDE Run Command dialog."
));
setQuickHelp
(
i18n
(
"<h1>Enhanced Browsing</h1> In this module you can configure some enhanced browsing"
" features of KDE. "
"<h2>Web Shortcuts</h2>Web Shortcuts are a quick way of using Web search engines. For example, type
\"
altavista:frobozz
\"
"
" or
\"
av:frobozz
\"
and Konqueror will do a search on AltaVista for
\"
frobozz
\"
."
" Even easier: just press Alt+F2 (if you have not"
" changed this shortcut) and enter the shortcut in the KDE Run Command dialog."
));
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
QMap
<
QString
,
KCModule
*>
helper
;
QMap
<
QString
,
KCModule
*>
helper
;
// Load the plugins. This saves a public method in KUriFilter just for this.
const
KService
::
List
offers
=
KServiceTypeTrader
::
self
()
->
query
(
"KUriFilter/Plugin"
);
const
KService
::
List
offers
=
KServiceTypeTrader
::
self
()
->
query
(
"KUriFilter/Plugin"
);
KService
::
List
::
ConstIterator
it
=
offers
.
begin
();
const
KService
::
List
::
ConstIterator
end
=
offers
.
end
();
for
(;
it
!=
end
;
++
it
)
{
KUriFilterPlugin
*
plugin
=
(
*
it
)
->
createInstance
<
KUriFilterPlugin
>
(
this
);
for
(;
it
!=
end
;
++
it
)
{
KUriFilterPlugin
*
plugin
=
(
*
it
)
->
createInstance
<
KUriFilterPlugin
>
(
this
);
if
(
plugin
)
{
KCModule
*
module
=
plugin
->
configModule
(
this
,
0
);
if
(
module
)
{
...
...
@@ -73,22 +71,21 @@ KURIFilterModule::KURIFilterModule(QWidget *parent, const QVariantList &args)
}
}
if
(
modules
.
count
()
>
1
)
{
if
(
modules
.
count
()
>
1
)
{
QTabWidget
*
tab
=
new
QTabWidget
(
this
);
QMap
<
QString
,
KCModule
*>::
iterator
it2
;
for
(
it2
=
helper
.
begin
();
it2
!=
helper
.
end
();
++
it2
)
QMap
<
QString
,
KCModule
*>::
iterator
it2
;
for
(
it2
=
helper
.
begin
();
it2
!=
helper
.
end
();
++
it2
)
{
tab
->
addTab
(
it2
.
value
(),
it2
.
key
());
}
tab
->
setCurrentIndex
(
tab
->
indexOf
(
modules
.
first
()));
m_widget
=
tab
;
}
else
if
(
modules
.
count
()
==
1
)
{
}
else
if
(
modules
.
count
()
==
1
)
{
m_widget
=
modules
.
first
();
if
(
m_widget
->
layout
())
if
(
m_widget
->
layout
())
{
m_widget
->
layout
()
->
setMargin
(
0
);
}
}
if
(
m_widget
)
{
...
...
@@ -101,29 +98,27 @@ void KURIFilterModule::load()
// seems not to be necessary, since modules automatically call load() on show (uwolfer)
// foreach( KCModule* module, modules )
// {
//
module->load();
//
module->load();
// }
}
void
KURIFilterModule
::
save
()
{
foreach
(
KCModule
*
module
,
modules
)
{
module
->
save
();
foreach
(
KCModule
*
module
,
modules
)
{
module
->
save
();
}
}
void
KURIFilterModule
::
defaults
()
{
foreach
(
KCModule
*
module
,
modules
)
{
module
->
defaults
();
foreach
(
KCModule
*
module
,
modules
)
{
module
->
defaults
();
}
}
KURIFilterModule
::~
KURIFilterModule
()
{
qDeleteAll
(
modules
);
qDeleteAll
(
modules
);
}
#include "main.moc"
src/kcms/webshortcuts/main.h
View file @
55d5a1d8
...
...
@@ -16,7 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef MAIN_H
#define MAIN_H
...
...
@@ -24,7 +23,8 @@
class
KUriFilter
;
class
KURIFilterModule
:
public
KCModule
{
class
KURIFilterModule
:
public
KCModule
{
Q_OBJECT
public:
...
...
Write
Preview
Supports
Markdown
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