Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported to Qt5 and fixed all warnings
- Loading branch information
1 parent
5a974e7
commit fd7837f
Showing
62 changed files
with
175 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,45 @@ | ||
project(qps) | ||
|
||
cmake_minimum_required(VERSION 2.6.1 FATAL_ERROR) | ||
|
||
find_package(Qt4 REQUIRED) | ||
#add_subdirectory(src) | ||
|
||
#set(QTERM_BINDIR "${CMAKE_INSTALL_PREFIX}gbin") | ||
#set(QTERM_DATADIR "${CMAKE_INSTALL_PREFIX}gshareqterm") | ||
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}gconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}config.h) | ||
|
||
|
||
set(SOURCES | ||
proc.cpp | ||
qps.cpp screenshot.cpp | ||
pstable.cpp | ||
uidstr.cpp | ||
ttystr.cpp | ||
dialogs.cpp | ||
infobar.cpp | ||
fieldsel.cpp | ||
wchan.cpp | ||
prefs.cpp | ||
lookup.cpp | ||
details.cpp | ||
command.cpp | ||
misc.cpp | ||
trayicon.cpp | ||
htable.cpp | ||
# htable2.cpp | ||
# pstable2.cpp | ||
qttableview.cpp | ||
) | ||
SET(HEADERS | ||
qps.h | ||
screenshot.h | ||
pstable.h | ||
dialogs.h | ||
fieldsel.h | ||
prefs.h | ||
infobar.h | ||
lookup.h | ||
details.h | ||
command.h | ||
misc.h | ||
trayicon.h | ||
htable.h | ||
# htable2.h | ||
# pstable2.h | ||
qttableview.h | ||
) | ||
|
||
|
||
# the next line sets up include and link directories and defines some variables that we will use. | ||
# you can modify the behavior by setting some variables, e.g. | ||
# set(QT_USE_OPENGL TRUE) # -> this will cause cmake to include and link against the OpenGL module | ||
include(${QT_USE_FILE}) | ||
|
||
INCLUDE_DIRECTORIES( | ||
# ${QT_INCLUDES} | ||
# ${PYTHON_INCLUDE_PATH} | ||
) | ||
#link_directories (${xmlrpc_BINARY_DIR}gsrc) | ||
|
||
# the variable vterm_SRC that require such a file. note: this assumes that you use | ||
# <<#include "header.moc">> in your files | ||
#qt4_automoc(${VTERM_SRC}) | ||
|
||
QT4_WRAP_CPP(MOC ${HEADERS}) | ||
QT4_WRAP_UI(UI watchdog.ui message.ui ) | ||
|
||
# create an executable file named "qtproject" from srcs | ||
add_executable(qps ${SOURCES} ${MOC}) | ||
target_link_libraries(qps ${QT_LIBRARIES} ) | ||
|
||
cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) | ||
set(PROJECT qps) | ||
project(${PROJECT}) | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release) | ||
endif() | ||
|
||
set(MAJOR_VERSION 1) | ||
set(MINOR_VERSION 10) | ||
set(PATCH_VERSION 16) | ||
set(QPS_VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}) | ||
add_definitions(-DQPS_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}") | ||
|
||
# C++11 support | ||
include(CheckCXXCompilerFlag) | ||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) | ||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) | ||
if(COMPILER_SUPPORTS_CXX11) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
elseif(COMPILER_SUPPORTS_CXX0X) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
else() | ||
message(FATAL "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. C++11 support is required") | ||
endif() | ||
|
||
find_package(Qt5 REQUIRED COMPONENTS Widgets X11Extras DBus) | ||
|
||
include(GNUInstallDirs) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
set(CMAKE_AUTOMOC ON) | ||
|
||
add_subdirectory(src) | ||
|
||
# building tarball with CPack | ||
include(InstallRequiredSystemLibraries) | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION}) | ||
set(CPACK_GENERATOR TBZ2) | ||
set(CPACK_SOURCE_GENERATOR TBZ2) | ||
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp) | ||
include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
set(SOURCES | ||
proc.cpp | ||
qps.cpp | ||
screenshot.cpp | ||
pstable.cpp | ||
uidstr.cpp | ||
ttystr.cpp | ||
dialogs.cpp | ||
infobar.cpp | ||
fieldsel.cpp | ||
wchan.cpp | ||
prefs.cpp | ||
lookup.cpp | ||
details.cpp | ||
command.cpp | ||
misc.cpp | ||
trayicon.cpp | ||
htable.cpp | ||
# htable2.cpp | ||
# pstable2.cpp | ||
qttableview.cpp | ||
) | ||
|
||
SET(HEADERS | ||
qps.h | ||
screenshot.h | ||
pstable.h | ||
dialogs.h | ||
fieldsel.h | ||
prefs.h | ||
infobar.h | ||
lookup.h | ||
details.h | ||
command.h | ||
misc.h | ||
trayicon.h | ||
htable.h | ||
# htable2.h | ||
# pstable2.h | ||
qttableview.h | ||
) | ||
|
||
qt5_wrap_ui(UIS | ||
watchdog.ui | ||
message.ui | ||
) | ||
|
||
add_executable(${PROJECT} | ||
${SOURCES} | ||
${HEADERS} | ||
${UIS} | ||
) | ||
|
||
target_link_libraries(${PROJECT} | ||
Qt5::Widgets | ||
Qt5::X11Extras | ||
Qt5::DBus | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -541,6 +541,7 @@ void Files::refresh() | |
|
||
bool Files::refresh_fds() | ||
{ | ||
return false; | ||
} | ||
|
||
void Files::refresh_window() | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.