generic: remove unused and fix some configuration checks

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-04-01 18:44:39 +03:00
parent f310ae90f6
commit 4abe1ff384
15 changed files with 78 additions and 108 deletions

View file

@ -28,11 +28,9 @@ set(XLIBDIR "${xrootdir}/lib/X11")
set(XKBDIR "${xrootdir}/share/X11")
check_function_exists(getpassphrase HAVE_GETPASSPHRASE)
check_function_exists(vsyslog HAVE_VSYSLOG)
check_function_exists(nice HAVE_NICE)
check_include_files(string.h HAVE_STRING_H)
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
check_include_files(limits.h HAVE_LIMITS_H)
check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp
check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst
@ -86,8 +84,5 @@ macro(define_library LIB FN)
endmacro(define_library)
# for Solaris
define_library(s authenticate)
define_library(posix4 sched_yield)
define_library(socket connect)
define_library(resolv dn_expand)
define_library(nsl gethostbyname)

View file

@ -22,8 +22,23 @@
/* Define to 1 if you have the `getpassphrase' function. */
#cmakedefine HAVE_GETPASSPHRASE 1
/* Define to 1 if you have the `vsyslog' function. */
#cmakedefine HAVE_VSYSLOG 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the `nice' function. */
#cmakedefine HAVE_NICE 1
/* Define to 1 if you have the `setpriority' function. */
#cmakedefine HAVE_SETPRIORITY 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the <malloc.h> header file. */
#cmakedefine HAVE_MALLOC_H 1

View file

@ -15,39 +15,6 @@
/* Defines if your system has the freetype library */
#cmakedefine HAVE_FREETYPE 1
/* Define to 1 if you have the `nice' function. */
#cmakedefine HAVE_NICE 1
/* Define to 1 if you have the `getpassphrase' function. */
#cmakedefine HAVE_GETPASSPHRASE 1
/* Define to 1 if you have the `vsyslog' function. */
#cmakedefine HAVE_VSYSLOG 1
/* Define to 1 if you have the `setpriority' function. */
#cmakedefine HAVE_SETPRIORITY 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the <malloc.h> header file. */
#cmakedefine HAVE_MALLOC_H 1
/* KDE's default home directory */
#cmakedefine KDE_DEFAULT_HOME "${KDE_DEFAULT_HOME}"

View file

@ -20,7 +20,7 @@
#include "kio_floppy.h"
#include <config-workspace.h>
#include "config-unix.h"
#ifdef HAVE_STRING_H
#include <string.h>

View file

@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include <config-workspace.h>
#include "config-unix.h"
#include "client.h"

View file

@ -29,7 +29,6 @@
#include <QPixmap>
#include <QPainter>
#include <QTimer>
#include "config-workspace.h"
CurtainEffect::CurtainEffect(QWidget *parent, QPixmap *pixmap)
: LogoutEffect(parent, pixmap)

View file

@ -29,16 +29,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include <config-workspace.h>
#include "config-unix.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include "server.h"
#include <unistd.h>
#include "server.h"
#include <kconfig.h>
#include <kconfiggroup.h>

View file

@ -22,9 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include "config-ksmserver.h"
#include "server.h"
#include <fixx11h.h>
#include <config-workspace.h>
#include <config-ksmserver.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
@ -44,7 +45,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kconfig.h>
#include <kmanagerselection.h>
#include <kwindowsystem.h>
#include "server.h"
#include <QtGui/qx11info_x11.h>
#include <QtCore/qfile.h>

View file

@ -19,12 +19,16 @@
*/
#include "config-unix.h"
#include "screensaverwindow.h"
#include "kscreensaversettings.h"
#ifdef HAVE_SETPRIORITY
# include <sys/resource.h>
#endif
#include <QApplication>
#include <QtGui/qevent.h>
#include <QtGui/qevent.h>
#include <QPainter>
#include <QTimer>
#include <QtGui/qx11info_x11.h>
@ -187,7 +191,7 @@ bool ScreenSaverWindow::startXScreenSaver()
m_ScreenSaverProcess.start(saverProgram, saverArgs);
if (m_ScreenSaverProcess.waitForStarted()) {
#ifdef HAVE_SETPRIORITY
setpriority(PRIO_PROCESS, m_ScreenSaverProcess.pid(), mPriority);
setpriority(PRIO_PROCESS, m_ScreenSaverProcess.pid(), 10);
#endif
return true;
}

View file

@ -28,8 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include <config-workspace.h>
#include <config-unix.h> // HAVE_LIMITS_H
#include <config-unix.h> // HAVE_SYS_TIME_H, HAVE_LIMITS_H
#include <pwd.h>
#include <sys/types.h>

View file

@ -23,10 +23,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include "config-workspace.h"
#include "shutdowndlg.h"
#include "plasma/framesvg.h"
#include "plasma/theme.h"
#include <stdio.h>
#include <QApplication>
#include <QDesktopWidget>
#include <QTimer>
@ -43,24 +46,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kiconloader.h>
#include <klocale.h>
#include <kuser.h>
#include <kjob.h>
#include <Solid/PowerManagement>
#include <kwindowsystem.h>
#include <netwm.h>
#include <KStandardDirs>
#include <kdeclarative.h>
#include <stdio.h>
#include <kxerrorhandler.h>
#include <kworkspace/kdisplaymanager.h>
#include <config-workspace.h>
#include "logouteffect.h"
#include "moc_shutdowndlg.cpp"
#include <kjob.h>
#define FONTCOLOR "#bfbfbf"
KSMShutdownFeedback * KSMShutdownFeedback::s_pSelf = 0L;

View file

@ -29,11 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
#include <kglobalsettings.h>
#include <QDir>
#include <krun.h>
#include <config-workspace.h>
#include <config-unix.h> // HAVE_LIMITS_H
#include "config-unix.h" // HAVE_SYS_TIME_H, HAVE_LIMITS_H
#include <pwd.h>
#include <sys/types.h>
@ -59,8 +55,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <QPushButton>
#include <QTimer>
#include <QDir>
#include <QtDBus/QtDBus>
#include <kglobalsettings.h>
#include <krun.h>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
@ -69,11 +68,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <ktemporaryfile.h>
#include <knotification.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include "global.h"
#include "server.h"
#include "client.h"
#include <kdebug.h>
#include <QtGui/qx11info_x11.h>

View file

@ -32,7 +32,8 @@ const int LAST_STATE = 5;
extern int screen_number;
#include <config-workspace.h>
#include "config-unix.h"
#include "config-workspace.h"
#include "splash.h"
#include "qcolor.h"

View file

@ -19,36 +19,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "config-unix.h"
#include "main.h"
//#define QT_CLEAN_NAMESPACE
#include <ksharedconfig.h>
#include <kglobal.h>
#include <klocale.h>
#include <stdlib.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <kcrash.h>
#include <signal.h>
#include <fcntl.h>
#include <QtGui/qx11info_x11.h>
#include <stdio.h>
#include <fixx11h.h>
#include <kxerrorhandler.h>
#include <QDBusConnection>
#include <QMessageBox>
#include <QEvent>
#include <kdialog.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <kde_file.h>
#include <QLabel>
#include <KComboBox>
#include <QVBoxLayout>
#include "config-workspace.h"
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@ -58,6 +35,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h>
#endif // HAVE_MALLOC_H
#include <QDBusConnection>
#include <QMessageBox>
#include <QEvent>
#include <QVBoxLayout>
#include <QLabel>
#include <ksharedconfig.h>
#include <kglobal.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <kcrash.h>
#include <kxerrorhandler.h>
#include <kdialog.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <kde_file.h>
#include <KComboBox>
#include <QtGui/qx11info_x11.h>
#include <fixx11h.h>
#include <ksmserver_interface.h>
#include "atoms.h"

View file

@ -18,19 +18,25 @@
*/
#include "kworkspace.h"
#include <QApplication>
#include <QDataStream>
#include <kapplication.h>
#include <QFile>
#include <QFileInfo>
#include <QTextStream>
#include <klocale.h>
#include <QDateTime>
#include <kstandarddirs.h>
#include <QtDBus/QtDBus>
#include <stdlib.h> // getenv()
#include <ksmserver_interface.h>
#include <QSocketNotifier>
#include <QtDBus/QtDBus>
#include <kapplication.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <ksmserver_interface.h>
#include <unistd.h> // geteuid()
#include <stdlib.h> // getenv()
#include <pwd.h>
#include <sys/types.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
@ -46,15 +52,6 @@
#define DISPLAY "QWS_DISPLAY"
#endif
#include "config-workspace.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif // HAVE_UNISTD_H
#include <pwd.h>
#include <sys/types.h>
#include "kworkspace_p.h"
namespace KWorkSpace