Commit 85943270 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: time to increase dependancy

parent 31730021
Pipeline #31330 failed with stage
in 8 minutes and 5 seconds
......@@ -3,7 +3,7 @@ set(PIM_VERSION "5.15.41")
project(libkdepim VERSION ${PIM_VERSION})
set(KF5_MIN_VERSION "5.72.0")
set(KF5_MIN_VERSION "5.73.0")
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
......
......@@ -94,14 +94,6 @@ ecm_generate_headers(libkdepim_Camelcasewidgets_HEADERS
RELATIVE widgets
)
ecm_generate_headers(libkdepim_Camelcasemisc_old_HEADERS
HEADER_NAMES
KCursorSaver
REQUIRED_HEADERS libkdepim_misc_old_HEADERS
PREFIX Libkdepim
RELATIVE misc
)
ecm_generate_headers(libkdepim_Camelcasemisc_HEADERS
HEADER_NAMES
UiStateSaver
......@@ -157,21 +149,6 @@ install(FILES
COMPONENT Devel
)
if (${KF5GuiAddons_VERSION} VERSION_LESS "5.73.0")
MESSAGE(STATUS "Install old kcursorsaver")
install(FILES
${libkdepim_Camelcasemisc_old_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Libkdepim
COMPONENT Devel
)
install(FILES
${libkdepim_misc_old_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/libkdepim
COMPONENT Devel
)
endif()
install(FILES
${PRI_FILENAME}
DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......
/*
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef kcursorsaver_h
#define kcursorsaver_h
#include <QCursor>
#include <QApplication>
namespace KPIM {
/**
* @short sets a cursor and makes sure it's restored on destruction
* Create a KCursorSaver object when you want to set the cursor.
* As soon as it gets out of scope, it will restore the original
* cursor.
*/
class KCursorSaver
{
public:
/// constructor taking QCursor shapes
explicit KCursorSaver(Qt::CursorShape shape)
{
QApplication::setOverrideCursor(QCursor(shape));
inited = true;
}
/// copy constructor. The right side won't restore the cursor
KCursorSaver(const KCursorSaver &rhs)
{
*this = rhs;
}
/// restore the cursor
~KCursorSaver()
{
if (inited) {
QApplication::restoreOverrideCursor();
}
}
/// call this to explicitly restore the cursor
inline void restoreCursor()
{
QApplication::restoreOverrideCursor();
inited = false;
}
protected:
void operator=(const KCursorSaver &rhs)
{
inited = rhs.inited;
rhs.inited = false;
}
private:
mutable bool inited;
};
/**
* convenience functions
*/
namespace KBusyPtr {
inline KCursorSaver idle()
{
return KCursorSaver(Qt::ArrowCursor);
}
inline KCursorSaver busy()
{
return KCursorSaver(Qt::WaitCursor);
}
}
}
#endif /*kbusyptr_h_*/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment