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 Workspace
Commits
8b4cf5a1
Commit
8b4cf5a1
authored
Dec 21, 2020
by
Alexander Lohnau
💬
Browse files
Remove dead code
parent
b6cc4017
Changes
13
Hide whitespace changes
Inline
Side-by-side
applets/systemtray/tests/statusnotifier/statusnotifiertest.cpp
View file @
8b4cf5a1
...
...
@@ -221,8 +221,6 @@ void StatusNotifierTest::secondaryActivateRequested(const QPoint& pos)
void
StatusNotifierTest
::
scrollRequested
(
int
delta
,
Qt
::
Orientation
orientation
)
{
///QString msg = QString("Scrolled " << " by: ");
//+ //QString msg = QString("Scrolled " + ((orientation == Qt::Horizontal) ? "Horizontally" : "Vertically") + " by: " //+ QString::number(delta));
QString
msg
(
QStringLiteral
(
"Scrolled by "
));
msg
.
append
(
QString
::
number
(
delta
));
msg
.
append
((
orientation
==
Qt
::
Horizontal
)
?
" Horizontally"
:
" Vertically"
);
...
...
@@ -237,10 +235,8 @@ void StatusNotifierTest::enableJob(bool enable)
qDebug
()
<<
"Job enabled."
<<
enable
;
if
(
enable
)
{
d
->
job
=
new
PumpJob
(
speedSlider
->
value
());
//QObject::connect(d->job, &KJob::percent, this, &StatusNotifierTest::setJobProgress);
QObject
::
connect
(
d
->
job
,
SIGNAL
(
percent
(
KJob
*
,
unsigned
long
)),
this
,
SLOT
(
setJobProgress
(
KJob
*
,
unsigned
long
)));
QObject
::
connect
(
d
->
job
,
&
KJob
::
result
,
this
,
&
StatusNotifierTest
::
result
);
//d->job->start(); // KIO autostarts jobs
}
else
{
if
(
d
->
job
)
{
d
->
timer
->
stop
();
...
...
components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
View file @
8b4cf5a1
...
...
@@ -46,7 +46,6 @@ PlasmaAppletItem::PlasmaAppletItem(const KPluginMetaData& info):
m_local
=
dir
.
exists
()
&&
dir
.
isWritable
();
}
//attrs.insert("recommended", flags & Recommended ? true : false);
setText
(
m_info
.
name
()
+
" - "
+
m_info
.
category
().
toLower
());
if
(
QIcon
::
hasThemeIcon
(
info
.
pluginId
()))
{
...
...
@@ -264,10 +263,6 @@ void PlasmaAppletItemModel::populateModel(const QStringList &whatChanged)
}
clear
();
//qDebug() << "populating model, our application is" << m_application;
//qDebug() << "number of applets is"
// << Plasma::Applet::listAppletInfo(QString(), m_application).count();
auto
filter
=
[
this
](
const
KPluginMetaData
&
plugin
)
->
bool
{
...
...
@@ -362,7 +357,6 @@ QSet<QString> PlasmaAppletItemModel::categories() const
QMimeData
*
PlasmaAppletItemModel
::
mimeData
(
const
QModelIndexList
&
indexes
)
const
{
//qDebug() << "GETTING MIME DATA\n";
if
(
indexes
.
count
()
<=
0
)
{
return
nullptr
;
}
...
...
dataengines/executable/executable.cpp
View file @
8b4cf5a1
...
...
@@ -36,7 +36,6 @@ ExecutableContainer::~ExecutableContainer()
void
ExecutableContainer
::
finished
(
int
exitCode
,
QProcess
::
ExitStatus
exitStatus
)
{
//qDebug() << objectName();
setData
(
QStringLiteral
(
"exit code"
),
exitCode
);
setData
(
QStringLiteral
(
"exit status"
),
exitStatus
);
setData
(
QStringLiteral
(
"stdout"
),
QString
::
fromLocal8Bit
(
m_process
->
readAllStandardOutput
()));
...
...
@@ -46,7 +45,6 @@ void ExecutableContainer::finished(int exitCode, QProcess::ExitStatus exitStatus
void
ExecutableContainer
::
exec
()
{
//qDebug() << objectName();
if
(
!
m_process
)
{
m_process
=
new
KProcess
();
connect
(
m_process
,
SIGNAL
(
finished
(
int
,
QProcess
::
ExitStatus
)),
...
...
@@ -71,7 +69,6 @@ ExecutableEngine::ExecutableEngine(QObject* parent, const QVariantList& args)
bool
ExecutableEngine
::
sourceRequestEvent
(
const
QString
&
source
)
{
//qDebug() << source;
addSource
(
new
ExecutableContainer
(
source
,
this
));
return
true
;
}
...
...
dataengines/geolocation/location_gps.cpp
View file @
8b4cf5a1
...
...
@@ -58,19 +58,16 @@ void Gpsd::run()
#else
if
(
gps_poll
(
m_gpsdata
)
!=
-
1
)
{
#endif
//qDebug() << "poll ok";
#if GPSD_API_MAJOR_VERSION >= 9
if
(
m_gpsdata
->
online
.
tv_sec
||
m_gpsdata
->
online
.
tv_nsec
)
{
#else
if
(
m_gpsdata
->
online
)
{
#endif
//qDebug() << "online";
#if GPSD_API_MAJOR_VERSION >= 10
if
(
m_gpsdata
->
fix
.
status
!=
STATUS_NO_FIX
)
{
#else
if
(
m_gpsdata
->
status
!=
STATUS_NO_FIX
)
{
#endif
//qDebug() << "fix";
d
[
"accuracy"
]
=
30
;
d
[
"latitude"
]
=
QString
::
number
(
m_gpsdata
->
fix
.
latitude
);
d
[
"longitude"
]
=
QString
::
number
(
m_gpsdata
->
fix
.
longitude
);
...
...
dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp
View file @
8b4cf5a1
...
...
@@ -336,12 +336,6 @@ void UKMETIon::findPlace(const QString& place, const QString& source)
this
,
&
UKMETIon
::
setup_slotDataArrived
);
connect
(
getJob
,
&
KJob
::
result
,
this
,
&
UKMETIon
::
setup_slotJobFinished
);
/*
// Handle redirects for direct hit places.
connect(getJob, SIGNAL(redirection(KIO::Job*,KUrl)),
this, SLOT(setup_slotRedirected(KIO::Job*,KUrl)));
*/
}
void
UKMETIon
::
getFiveDayForecast
(
const
QString
&
source
)
...
...
kcms/cursortheme/kcmcursortheme.cpp
View file @
8b4cf5a1
...
...
@@ -104,7 +104,6 @@ CursorThemeConfig::CursorThemeConfig(QObject *parent, const QVariantList &args)
CursorThemeConfig
::~
CursorThemeConfig
()
{
/* */
}
CursorThemeSettings
*
CursorThemeConfig
::
cursorThemeSettings
()
const
...
...
kcms/kfontinst/viewpart/FontViewPart.cpp
View file @
8b4cf5a1
...
...
@@ -82,7 +82,6 @@ CFontViewPart::CFontViewPart(QWidget *parentWidget, QObject *parent, const QList
QFrame
*
previewFrame
=
new
QFrame
(
itsFrame
);
QWidget
*
controls
=
new
QWidget
(
itsFrame
);
// QGroupBox *metaBox=new QGroupBox(i18n("Information:"), controls);
itsFaceWidget
=
new
QWidget
(
controls
);
...
...
@@ -91,11 +90,6 @@ CFontViewPart::CFontViewPart(QWidget *parentWidget, QObject *parent, const QList
QBoxLayout
*
previewLayout
=
new
QBoxLayout
(
QBoxLayout
::
LeftToRight
,
previewFrame
),
*
controlsLayout
=
new
QBoxLayout
(
QBoxLayout
::
LeftToRight
,
controls
),
*
faceLayout
=
new
QBoxLayout
(
QBoxLayout
::
LeftToRight
,
itsFaceWidget
);
// QBoxLayout *metaLayout=new QBoxLayout(QBoxLayout::LeftToRight, metaBox);
// itsMetaLabel=new QLabel(metaBox);
// itsMetaLabel->setAlignment(Qt::AlignTop);
// metaLayout->addWidget(itsMetaLabel);
previewLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
previewLayout
->
setSpacing
(
0
);
faceLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
@@ -124,8 +118,6 @@ CFontViewPart::CFontViewPart(QWidget *parentWidget, QObject *parent, const QList
itsPreview
->
engine
()
->
readConfig
(
*
itsConfig
);
//controlsLayout->addWidget(metaBox);
//controlsLayout->addStretch(2);
controlsLayout
->
addWidget
(
itsFaceWidget
);
controlsLayout
->
addStretch
(
1
);
controlsLayout
->
addWidget
(
itsInstallButton
);
...
...
@@ -181,9 +173,6 @@ bool CFontViewPart::openUrl(const QUrl &url)
if
(
!
url
.
isValid
()
||
!
closeUrl
())
return
false
;
// itsMetaLabel->setText(QString());
// itsMetaInfo.clear();
itsFontDetails
=
FC
::
decode
(
url
);
if
(
!
itsFontDetails
.
family
.
isEmpty
()
||
KFI_KIO_FONTS_PROTOCOL
==
url
.
scheme
()
||
mostLocalUrl
(
url
,
itsFrame
).
isLocalFile
())
...
...
@@ -230,7 +219,6 @@ void CFontViewPart::timeout()
int
fileIndex
(
-
1
);
QString
fontFile
;
// itsMetaUrl=url();
delete
itsTempDir
;
itsTempDir
=
nullptr
;
...
...
@@ -318,8 +306,6 @@ void CFontViewPart::timeout()
mime
==
"application/x-font-otf"
||
mime
==
"application/x-font-type1"
)
{
fontFile
=
itsTempDir
->
filePath
(
entry
->
name
());
//setLocalFilePath(itsTempDir->path()+QLatin1Char('/')+entry->name());
// itsMetaUrl=QUrl::fromLocalFile(localFilePath());
break
;
}
else
...
...
@@ -389,10 +375,6 @@ void CFontViewPart::previewStatus(bool st)
}
itsChangeTextAction
->
setEnabled
(
st
);
// if(st)
// getMetaInfo(itsFaceSelector->isVisible() && itsFaceSelector->value()>0
// ? itsFaceSelector->value()-1 : 0);
// else
if
(
!
st
)
KMessageBox
::
error
(
itsFrame
,
i18n
(
"Could not read font."
));
}
...
...
@@ -509,47 +491,6 @@ void CFontViewPart::checkInstallable()
}
}
#if 0
void CFontViewPart::getMetaInfo(int face)
{
if(itsMetaInfo[face].isEmpty())
{
// Pass as much inofmration as possible to analyzer...
if(KFI_KIO_FONTS_PROTOCOL!=itsMetaUrl.protocol())
{
itsMetaUrl.removeQueryItem(KFI_KIO_FACE);
if(face>0)
itsMetaUrl.addQueryItem(KFI_KIO_FACE, QString().setNum(face));
}
KFileMetaInfo meta(itsMetaUrl);
if(meta.isValid() && meta.keys().count())
{
QStringList keys(meta.keys());
QStringList::const_iterator it(keys.begin()),
end(keys.end());
itsMetaInfo[face]="<table>";
for(; it!=end; ++it)
{
KFileMetaInfoItem mi(meta.item(*it));
itsMetaInfo[face]+="<tr><td><b>"+mi.name()+"</b></td></tr><tr><td>"+
mi.value().toString()+"</td></tr>";
}
itsMetaInfo[face]+="</table>";
itsMetaLabel->setText(itsMetaInfo[face]);
}
else
itsMetaLabel->setText(i18n("<p>No information</p>"));
}
else
itsMetaLabel->setText(itsMetaInfo[face]);
}
#endif
BrowserExtension
::
BrowserExtension
(
CFontViewPart
*
parent
)
:
KParts
::
BrowserExtension
(
parent
)
{
...
...
kcms/kfontinst/viewpart/FontViewPart.h
View file @
8b4cf5a1
...
...
@@ -79,24 +79,20 @@ class CFontViewPart : public KParts::ReadOnlyPart
private:
void
checkInstallable
();
// void getMetaInfo(int face);
private:
// QMap<int, QString> itsMetaInfo;
CFontPreview
*
itsPreview
;
QPushButton
*
itsInstallButton
;
QWidget
*
itsFaceWidget
;
QFrame
*
itsFrame
;
QLabel
*
itsFaceLabel
;
// *itsMetaLabel;
QSpinBox
*
itsFaceSelector
;
QAction
*
itsChangeTextAction
;
int
itsFace
;
KSharedConfigPtr
itsConfig
;
BrowserExtension
*
itsExtension
;
QProcess
*
itsProc
;
// KUrl itsMetaUrl;
QTemporaryDir
*
itsTempDir
;
Misc
::
TFont
itsFontDetails
;
FontInstInterface
*
itsInterface
;
...
...
klipper/configdialog.cpp
View file @
8b4cf5a1
...
...
@@ -72,14 +72,6 @@ ActionsWidget::ActionsWidget(QWidget* parent)
m_ui
.
kcfg_ActionList
->
header
()
->
resizeSection
(
0
,
250
);
}
#if 0
if ( /*KServiceTypeTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty()*/ true) // see notice in configdialog.cpp about KRegExpEditor
{
cbUseGUIRegExpEditor->hide();
cbUseGUIRegExpEditor->setChecked( false );
}
#endif
connect
(
m_ui
.
kcfg_ActionList
,
&
ActionsTreeWidget
::
itemSelectionChanged
,
this
,
&
ActionsWidget
::
onSelectionChanged
);
connect
(
m_ui
.
kcfg_ActionList
,
&
ActionsTreeWidget
::
itemDoubleClicked
,
this
,
&
ActionsWidget
::
onEditAction
);
...
...
klipper/historyitem.cpp
View file @
8b4cf5a1
...
...
@@ -40,12 +40,6 @@ HistoryItem::~HistoryItem() {
HistoryItemPtr
HistoryItem
::
create
(
const
QMimeData
*
data
)
{
#if 0
int i=0;
foreach ( QString format, data->formats() ) {
qCDebug(KLIPPER_LOG) << "format(" << i++ <<"): " << format;
}
#endif
if
(
data
->
hasUrls
())
{
KUrlMimeData
::
MetaDataMap
metaData
;
...
...
klipper/popupproxy.cpp
View file @
8b4cf5a1
...
...
@@ -93,12 +93,6 @@ void PopupProxy::tryInsertItem( HistoryItem const * const item,
text
.
replace
(
QLatin1Char
(
'&'
),
QLatin1String
(
"&&"
)
);
action
->
setText
(
text
);
}
else
{
#if 0 // not used because QAction#setIcon does not respect this size; it does scale anyway. TODO: find a way to set a bigger image
const QSize max_size( m_menu_width,m_menu_height/4 );
if ( image.height() > max_size.height() || image.width() > max_size.width() ) {
image = image.scaled( max_size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
}
#endif
action
->
setIcon
(
QIcon
(
image
));
}
...
...
klipper/urlgrabber.cpp
View file @
8b4cf5a1
...
...
@@ -54,24 +54,6 @@ URLGrabber::URLGrabber(History* history):
{
m_myPopupKillTimer
->
setSingleShot
(
true
);
connect
(
m_myPopupKillTimer
,
&
QTimer
::
timeout
,
this
,
&
URLGrabber
::
slotKillPopupMenu
);
// testing
/*
ClipAction *action;
action = new ClipAction( "^http:\\/\\/", "Web-URL" );
action->addCommand("kfmclient exec %s", "Open with Konqi", true);
action->addCommand("netscape -no-about-splash -remote \"openURL(%s, new-window)\"", "Open with Netscape", true);
m_myActions->append( action );
action = new ClipAction( "^mailto:", "Mail-URL" );
action->addCommand("kmail --composer %s", "Launch kmail", true);
m_myActions->append( action );
action = new ClipAction( "^\\/.+\\.jpg$", "Jpeg-Image" );
action->addCommand("kuickshow %s", "Launch KuickShow", true);
action->addCommand("kview %s", "Launch KView", true);
m_myActions->append( action );
*/
}
...
...
@@ -104,24 +86,19 @@ void URLGrabber::matchingMimeActions(const QString& clipData)
{
QUrl
url
(
clipData
);
if
(
!
KlipperSettings
::
enableMagicMimeActions
())
{
//qCDebug(KLIPPER_LOG) << "skipping mime magic due to configuration";
return
;
}
if
(
!
url
.
isValid
())
{
//qCDebug(KLIPPER_LOG) << "skipping mime magic due to invalid url";
return
;
}
if
(
url
.
isRelative
())
{
//openinng a relative path will just not work. what path should be used?
//qCDebug(KLIPPER_LOG) << "skipping mime magic due to relative url";
return
;
}
if
(
url
.
isLocalFile
())
{
if
(
clipData
==
QLatin1String
(
"//"
))
{
//qCDebug(KLIPPER_LOG) << "skipping mime magic due to C++ comment //";
return
;
}
if
(
!
QFile
::
exists
(
url
.
toLocalFile
()))
{
//qCDebug(KLIPPER_LOG) << "skipping mime magic due to nonexistent localfile";
return
;
}
}
...
...
@@ -180,7 +157,6 @@ const ActionList& URLGrabber::matchingActions( const QString& clipData, bool aut
void
URLGrabber
::
checkNewData
(
HistoryItemConstPtr
item
)
{
// qCDebug(KLIPPER_LOG) << "** checking new data: " << clipData;
actionMenu
(
item
,
true
);
// also creates m_myMatches
}
...
...
shell/scripting/scriptengine.cpp
View file @
8b4cf5a1
...
...
@@ -35,9 +35,6 @@
#include
<kshell.h>
#include
<KLocalizedContext>
// KIO
//#include <kemailsettings.h> // no camelcase include
#include
<Plasma/Applet>
#include
<Plasma/PluginLoader>
#include
<Plasma/Containment>
...
...
@@ -262,7 +259,6 @@ bool ScriptEngine::evaluateScript(const QString &script, const QString &path)
QJSValue
result
=
evaluate
(
script
,
path
);
if
(
result
.
isError
())
{
//qDebug() << "catch the exception!";
QString
error
=
i18n
(
"Error: %1 at line %2
\n\n
Backtrace:
\n
%3"
,
result
.
toString
(),
result
.
property
(
"lineNumber"
).
toInt
(),
...
...
@@ -278,7 +274,6 @@ bool ScriptEngine::evaluateScript(const QString &script, const QString &path)
void
ScriptEngine
::
exception
(
const
QJSValue
&
value
)
{
//qDebug() << "exception caught!" << value.toVariant();
emit
printError
(
value
.
toVariant
().
toString
());
}
...
...
@@ -302,7 +297,6 @@ QStringList ScriptEngine::pendingUpdateScripts(Plasma::Corona *corona)
QStringList
scriptPaths
;
if
(
scripts
.
isEmpty
())
{
//qDebug() << "no update scripts";
return
scriptPaths
;
}
...
...
@@ -316,7 +310,6 @@ QStringList ScriptEngine::pendingUpdateScripts(Plasma::Corona *corona)
}
if
(
script
.
startsWith
(
localXdgDir
))
{
// qDebug() << "skipping user local script: " << script;
continue
;
}
...
...
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