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
Plasma
Plasma Workspace
Commits
df03fb87
Commit
df03fb87
authored
Mar 06, 2021
by
Ahmad Samir
Browse files
Remove kcms/krdb/krdb_clearlibrarypath.cpp
This seems to be redundant, given that there is no Trolltech.conf nowadays.
parent
e2f5b3c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
kcms/krdb/CMakeLists.txt
View file @
df03fb87
# KI18N Translation Domain for this library
add_definitions
(
-DTRANSLATION_DOMAIN=\"krdb\"
)
add_subdirectory
(
ad
)
install
(
FILES krdb_libpathwipe.upd DESTINATION
${
KDE_INSTALL_DATADIR
}
/kconf_update
)
add_executable
(
krdb_clearlibrarypath krdb_clearlibrarypath.cpp
)
target_link_libraries
(
krdb_clearlibrarypath Qt::Core KF5::KDELibs4Support
)
install
(
TARGETS krdb_clearlibrarypath DESTINATION
${
KDE_INSTALL_LIBDIR
}
/kconf_update_bin
)
add_subdirectory
(
ad
)
add_library
(
krdb krdb.cpp
)
target_link_libraries
(
krdb PRIVATE Qt::Widgets Qt::DBus Qt5::X11Extras KF5::GuiAddons KF5::I18n KF5::WindowSystem KF5::ConfigWidgets PW::KWorkspace X11::X11
)
...
...
kcms/krdb/krdb_clearlibrarypath.cpp
deleted
100644 → 0
View file @
e2f5b3c8
/* This file is part of the KDE project
Copyright (C) 2008 Matthias Kretz <kretz@kde.org>
Copyright (C) 2011 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), Trolltech ASA
(or its successors, if any) and the KDE Free Qt Foundation, which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <KComponentData>
#include <KGlobal>
#include <KStandardDirs>
#include <QCoreApplication>
#include <QDir>
#include <QSettings>
#include <QStringList>
int
main
(
int
argc
,
char
**
argv
)
{
QCoreApplication
app
(
argc
,
argv
);
QSettings
settings
(
QStringLiteral
(
"Trolltech"
));
QString
qversion
=
qVersion
();
if
(
qversion
.
count
(
'.'
)
>
1
)
{
qversion
.
truncate
(
qversion
.
lastIndexOf
(
'.'
));
}
if
(
qversion
.
contains
(
'-'
))
{
qversion
.
truncate
(
qversion
.
lastIndexOf
(
'-'
));
}
const
QString
&
libPathKey
=
QStringLiteral
(
"/qt/%1/libraryPath"
).
arg
(
qversion
);
QStringList
kdeAdded
;
KComponentData
kcd
(
"krdb libraryPath fix"
);
const
QStringList
&
plugins
=
KGlobal
::
dirs
()
->
resourceDirs
(
"qtplugins"
);
foreach
(
const
QString
&
_path
,
plugins
)
{
QString
path
=
QDir
(
_path
).
canonicalPath
();
if
(
path
.
isEmpty
()
||
kdeAdded
.
contains
(
path
))
{
continue
;
}
kdeAdded
.
prepend
(
path
);
if
(
path
.
contains
(
QLatin1String
(
"/lib64/"
)))
{
path
.
replace
(
QLatin1String
(
"/lib64/"
),
QLatin1String
(
"/lib/"
));
if
(
!
kdeAdded
.
contains
(
path
))
{
kdeAdded
.
prepend
(
path
);
}
}
}
// Don't use toStringList! That's a different storage format
QStringList
libraryPath
=
settings
.
value
(
libPathKey
,
QString
()).
toString
().
split
(
QLatin1Char
(
':'
),
QString
::
SkipEmptyParts
);
// Remove all KDE paths, not needed anymore, done by $QT_PLUGIN_PATH
foreach
(
const
QString
&
path
,
const_cast
<
const
QStringList
&>
(
kdeAdded
))
{
libraryPath
.
removeAll
(
path
);
}
settings
.
remove
(
QStringLiteral
(
"/qt/KDE/kdeAddedLibraryPaths"
));
settings
.
setValue
(
libPathKey
,
libraryPath
.
join
(
QLatin1Char
(
':'
)));
return
0
;
}
kcms/krdb/krdb_libpathwipe.upd
deleted
100644 → 0
View file @
e2f5b3c8
Version=5
Id=LibraryPathWipeOut
Script=krdb_clearlibrarypath
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