mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwin: remove deprecated and dead code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
dbced4bbd1
commit
782c7257a1
16 changed files with 16 additions and 90 deletions
|
@ -30,9 +30,12 @@ endif()
|
|||
include_directories(${XCB_INCLUDE_DIR})
|
||||
|
||||
# for things that are also used by kwin libraries
|
||||
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h )
|
||||
configure_file(
|
||||
libkwineffects/kwinconfig.h.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h
|
||||
)
|
||||
# for kwin internal things
|
||||
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
|
||||
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h)
|
||||
|
||||
|
||||
########### global ###############
|
||||
|
@ -44,7 +47,7 @@ include_directories(BEFORE
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/libkdecorations
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/effects
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tabbox
|
||||
)
|
||||
)
|
||||
|
||||
add_subdirectory( libkdecorations )
|
||||
add_subdirectory( libkwineffects )
|
||||
|
@ -108,11 +111,11 @@ set(kwin_SRCS
|
|||
paintredirector.cpp
|
||||
virtualdesktops.cpp
|
||||
xcbutils.cpp
|
||||
)
|
||||
)
|
||||
|
||||
if(KWIN_BUILD_TABBOX)
|
||||
set(
|
||||
kwin_SRCS ${kwin_SRCS}
|
||||
set(kwin_SRCS
|
||||
${kwin_SRCS}
|
||||
tabbox/tabbox.cpp
|
||||
tabbox/clientmodel.cpp
|
||||
tabbox/declarative.cpp
|
||||
|
@ -124,15 +127,15 @@ if(KWIN_BUILD_TABBOX)
|
|||
endif()
|
||||
|
||||
if(KWIN_BUILD_SCREENEDGES)
|
||||
set(
|
||||
kwin_SRCS ${kwin_SRCS}
|
||||
set(kwin_SRCS
|
||||
${kwin_SRCS}
|
||||
screenedge.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(KWIN_BUILD_KAPPMENU)
|
||||
set(
|
||||
kwin_SRCS ${kwin_SRCS}
|
||||
set(kwin_SRCS
|
||||
${kwin_SRCS}
|
||||
appmenu.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#cmakedefine KWIN_BUILD_TABBOX 1
|
||||
#cmakedefine KWIN_BUILD_DESKTOPCHANGEOSD 1
|
||||
#cmakedefine KWIN_BUILD_SCREENEDGES 1
|
||||
#cmakedefine KWIN_BUILD_KAPPMENU 1
|
||||
#cmakedefine KWIN_BUILD_OXYGEN 1
|
||||
#define KWIN_CONFIG "kwinrc"
|
||||
#define KWIN_VERSION_STRING "${KDE_VERSION_STRING}"
|
||||
|
|
|
@ -221,9 +221,4 @@ void DBusInterface::previousDesktop()
|
|||
VirtualDesktopManager::self()->moveTo<DesktopPrevious>();
|
||||
}
|
||||
|
||||
QList< int > DBusInterface::decorationSupportedColors()
|
||||
{
|
||||
return decorationPlugin()->supportedColors();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -64,7 +64,6 @@ public Q_SLOTS: // METHODS
|
|||
**/
|
||||
void circulateDesktopApplications();
|
||||
int currentDesktop();
|
||||
QList<int> decorationSupportedColors();
|
||||
/**
|
||||
* @deprecated
|
||||
**/
|
||||
|
|
|
@ -57,11 +57,6 @@ void DecorationPlugin::error(const QString &error_msg)
|
|||
setDisabled(true);
|
||||
}
|
||||
|
||||
bool DecorationPlugin::provides(Requirement)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void DecorationPlugin::setDisabled(bool disabled)
|
||||
{
|
||||
m_disabled = disabled;
|
||||
|
@ -128,20 +123,6 @@ Qt::Corner DecorationPlugin::closeButtonCorner()
|
|||
return factory()->closeButtonCorner();
|
||||
}
|
||||
|
||||
QList< int > DecorationPlugin::supportedColors() const
|
||||
{
|
||||
QList<int> ret;
|
||||
if (m_disabled) {
|
||||
return ret;
|
||||
}
|
||||
for (Ability ab = ABILITYCOLOR_FIRST;
|
||||
ab < ABILITYCOLOR_END;
|
||||
ab = static_cast<Ability>(ab + 1))
|
||||
if (factory()->supports(ab))
|
||||
ret << ab;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void DecorationPlugin::resetCompositing()
|
||||
{
|
||||
if (m_disabled) {
|
||||
|
|
|
@ -34,7 +34,6 @@ class DecorationPlugin
|
|||
Q_OBJECT
|
||||
public:
|
||||
virtual ~DecorationPlugin();
|
||||
virtual bool provides(Requirement);
|
||||
/**
|
||||
* @returns @c true if there is no decoration plugin.
|
||||
**/
|
||||
|
@ -50,13 +49,6 @@ public:
|
|||
|
||||
QString supportInformation();
|
||||
|
||||
// D-Bus interface
|
||||
/**
|
||||
* @deprecated
|
||||
* @todo: remove KDE5
|
||||
**/
|
||||
QList<int> supportedColors() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void resetCompositing();
|
||||
protected:
|
||||
|
|
|
@ -8,5 +8,5 @@ endif()
|
|||
add_subdirectory( kwindesktop )
|
||||
|
||||
if( KWIN_BUILD_TABBOX )
|
||||
add_subdirectory( kwintabbox )
|
||||
add_subdirectory( kwintabbox )
|
||||
endif()
|
||||
|
|
|
@ -526,9 +526,4 @@ void KDecorationPreviewOptions::setCustomTitleButtons(const QString &left, const
|
|||
updateSettings();
|
||||
}
|
||||
|
||||
bool KDecorationPreviewPlugins::provides(Requirement)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "moc_preview.cpp"
|
||||
|
|
|
@ -158,7 +158,6 @@ class KDecorationPreviewPlugins
|
|||
{
|
||||
public:
|
||||
explicit KDecorationPreviewPlugins(const KSharedConfigPtr &cfg);
|
||||
virtual bool provides(Requirement);
|
||||
};
|
||||
|
||||
inline KDecorationPreviewPlugins::KDecorationPreviewPlugins(const KSharedConfigPtr &cfg)
|
||||
|
|
|
@ -208,16 +208,6 @@ public:
|
|||
AbilityButtonShade = 1009, ///< decoration supports a shade button
|
||||
AbilityButtonResize = 1010, ///< decoration supports a resize button
|
||||
AbilityButtonApplicationMenu = 1011, ///< decoration supports the application menu button
|
||||
// colors
|
||||
AbilityColorTitleBack = 2000, ///< decoration supports titlebar background color, @deprecated @todo remove KDE5
|
||||
ABILITYCOLOR_FIRST = AbilityColorTitleBack, ///< @internal, @deprecated @todo remove KDE5
|
||||
AbilityColorTitleFore = 2001, ///< decoration supports titlebar foreground color, @deprecated @todo remove KDE5
|
||||
AbilityColorTitleBlend = 2002, ///< decoration supports second titlebar background color, @deprecated @todo remove KDE5
|
||||
AbilityColorFrame = 2010, ///< decoration supports frame color, @deprecated @todo remove KDE5
|
||||
AbilityColorHandle = 2011, ///< decoration supports resize handle color, @deprecated @todo remove KDE5
|
||||
AbilityColorButtonBack = 2020, ///< decoration supports button background color, @deprecated @todo remove KDE5
|
||||
AbilityColorButtonFore = 2021, ///< decoration supports button foreground color, @deprecated @todo remove KDE5
|
||||
ABILITYCOLOR_END, ///< @internal, @deprecated @todo remove KDE5
|
||||
// compositing
|
||||
AbilityProvidesShadow = 3000, ///< The decoration draws its own shadows.
|
||||
/// @since 4.3
|
||||
|
@ -233,12 +223,8 @@ public:
|
|||
/// @since 4.10
|
||||
// Tabbing
|
||||
AbilityTabbing = 4000, ///< The decoration supports tabbing
|
||||
// TODO colors for individual button types
|
||||
ABILITY_DUMMY = 10000000,
|
||||
};
|
||||
|
||||
enum Requirement { REQUIREMENT_DUMMY = 1000000 };
|
||||
|
||||
/**
|
||||
* Regions that can be returned by KDecorationUnstable::region().
|
||||
*/
|
||||
|
@ -272,7 +258,6 @@ class KDecorationProvides
|
|||
{
|
||||
public:
|
||||
virtual ~KDecorationProvides() {}
|
||||
virtual bool provides(Requirement req) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -160,16 +160,6 @@ bool KDecorationPlugins::canLoad(QString nameStr, QLibrary **loadedLib)
|
|||
vptr = (int(*)())version_func;
|
||||
deco_version = vptr();
|
||||
} else {
|
||||
// block some decos known to link the unstable API but (for now) let through other legacy stuff
|
||||
const bool isLegacyStableABI = !(nameStr.contains("qtcurve", Qt::CaseInsensitive) ||
|
||||
nameStr.contains("crystal", Qt::CaseInsensitive) ||
|
||||
nameStr.contains("oxygen", Qt::CaseInsensitive));
|
||||
if (isLegacyStableABI) {
|
||||
// it's an old build of a legacy decoration that very likely uses the stable API
|
||||
// so we just set the API version to the current one
|
||||
// TODO: remove for 4.9.x or 4.10 - this is just to cover recompiles
|
||||
deco_version = KWIN_DECORATION_API_VERSION;
|
||||
}
|
||||
kWarning(1212) << QString("****** The library %1 has no API version ******").arg(path);
|
||||
kWarning(1212) << "****** Please use the KWIN_DECORATION macro in extern \"C\" to get this decoration loaded in future versions of kwin";
|
||||
}
|
||||
|
@ -246,7 +236,6 @@ bool KDecorationPlugins::loadPlugin(QString nameStr)
|
|||
}
|
||||
|
||||
fact = create_ptr();
|
||||
fact->checkRequirements(this); // let it check what is supported
|
||||
|
||||
pluginStr = nameStr;
|
||||
|
||||
|
|
|
@ -51,10 +51,6 @@ bool KDecorationFactory::reset(unsigned long)
|
|||
return true;
|
||||
}
|
||||
|
||||
void KDecorationFactory::checkRequirements(KDecorationProvides*)
|
||||
{
|
||||
}
|
||||
|
||||
QList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() const
|
||||
{
|
||||
return QList< BorderSize >() << BorderNormal;
|
||||
|
|
|
@ -75,7 +75,6 @@ public:
|
|||
|
||||
virtual bool supports(Ability ability) const = 0;
|
||||
|
||||
virtual void checkRequirements(KDecorationProvides* provides);
|
||||
/**
|
||||
* Returns the KDecorationOptions object, which is used to access
|
||||
* configuration settings for the decoration.
|
||||
|
|
|
@ -652,7 +652,7 @@ void EffectsHandler::sendReloadMessage(const QString& effectname)
|
|||
|
||||
KConfigGroup EffectsHandler::effectConfig(const QString& effectname)
|
||||
{
|
||||
KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig(KWIN_CONFIG, KConfig::NoGlobals);
|
||||
KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig("kwinrc", KConfig::NoGlobals);
|
||||
return kwinconfig->group("Effect-" + effectname);
|
||||
}
|
||||
|
||||
|
|
|
@ -486,7 +486,7 @@ int main(int argc, char * argv[])
|
|||
// ""known to be stupid" ideas ;-P
|
||||
// The invalid system parameter "" will use the systems default graphicssystem
|
||||
// "!= XRender" is intended since eg. pot. SW backends likely would profit from raster as well
|
||||
KConfigGroup config(KSharedConfig::openConfig(KWIN_CONFIG), "Compositing");
|
||||
KConfigGroup config(KSharedConfig::openConfig("kwinrc"), "Compositing");
|
||||
QString preferredSystem("native");
|
||||
if (config.readEntry("Enabled", true) && config.readEntry("Backend", "OpenGL") != "XRender")
|
||||
preferredSystem = "";
|
||||
|
|
|
@ -68,11 +68,6 @@
|
|||
<method name="waitForCompositingSetup">
|
||||
<arg type="b" direction="out"/>
|
||||
</method>
|
||||
<!-- @deprecated, @todo remove KDE5 -->
|
||||
<method name="decorationSupportedColors">
|
||||
<arg type="ai" direction="out"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
|
||||
</method>
|
||||
<method name="activeEffects">
|
||||
<arg type="as" direction="out"/>
|
||||
</method>
|
||||
|
|
Loading…
Add table
Reference in a new issue