OSDN Git Service

generic: remove unused and fix some configuration checks
authorIvailo Monev <xakepa10@gmail.com>
Fri, 1 Apr 2022 15:44:39 +0000 (18:44 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 1 Apr 2022 15:44:39 +0000 (18:44 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
15 files changed:
ConfigureChecks.cmake
config-unix.h.cmake
config-workspace.h.cmake
kioslave/floppy/kio_floppy.cpp
ksmserver/client.cpp
ksmserver/curtaineffect.cpp
ksmserver/legacy.cpp
ksmserver/main.cpp
ksmserver/screenlocker/greeter/screensaverwindow.cpp
ksmserver/shutdown.cpp
ksmserver/shutdowndlg.cpp
ksmserver/startup.cpp
ksplash/ksplashx/splash.cpp
kwin/main.cpp
libs/kworkspace/kworkspace.cpp

index 212307e..dba14ec 100644 (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)
index c721db4..6f41598 100644 (file)
 /* 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
index ac62110..68b7eb9 100644 (file)
 /* 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}"
 
index 09f4bd7..5b74d49 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "kio_floppy.h"
 
-#include <config-workspace.h>
+#include "config-unix.h"
 
 #ifdef HAVE_STRING_H
 #include <string.h>
index 76de37a..093d891 100644 (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"
 
index 2a6db5b..698f702 100644 (file)
@@ -29,7 +29,6 @@
 #include <QPixmap>
 #include <QPainter>
 #include <QTimer>
-#include "config-workspace.h"
 
 CurtainEffect::CurtainEffect(QWidget *parent, QPixmap *pixmap)
     : LogoutEffect(parent, pixmap)
index 2e2cfe1..d3bf6d6 100644 (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>
index d81d944..110ad69 100644 (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>
 
index 03bd824..8d58d83 100644 (file)
  */
 
 
+#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;
     }
index 7f38f5f..109233b 100644 (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>
index f570004..5fca30c 100644 (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;
index 4b50361..9751a47 100644 (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>
 
index de4a078..c169862 100644 (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"
index b4ed561..0d2a66e 100644 (file)
@@ -19,44 +19,42 @@ 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 <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif // HAVE_UNISTD_H
+
+#ifdef HAVE_MALLOC_H
+#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 <QLabel>
 #include <KComboBox>
-#include <QVBoxLayout>
-
-#include "config-workspace.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif // HAVE_UNISTD_H
-
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif // HAVE_MALLOC_H
+#include <QtGui/qx11info_x11.h>
+#include <fixx11h.h>
 
 #include <ksmserver_interface.h>
 
index 510abb9..7021be3 100644 (file)
 */
 
 #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 <QSocketNotifier>
 #include <QtDBus/QtDBus>
-#include <stdlib.h> // getenv()
+
+#include <kapplication.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
 #include <ksmserver_interface.h>
-#include <QSocketNotifier>
+
+#include <unistd.h> // geteuid()
+#include <stdlib.h> // getenv()
+#include <pwd.h>
+#include <sys/types.h>
 
 #ifdef Q_WS_X11
 #include <X11/Xlib.h>
 #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