From 24438227fe12c93813bdc9bb7b041301e11b6254 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 9 Nov 2013 18:26:30 -0500 Subject: [PATCH 1/8] Bump version to 2.12 for KDE SC 4.12 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 2afc62c7..4c1bfddb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,7 +29,7 @@ #include #include -#define KONSOLE_VERSION "2.11.999" +#define KONSOLE_VERSION "2.12" using Konsole::Application; From f13c069708ab9b9e71e124dbaac93febe30d3f9e Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Thu, 21 Nov 2013 00:25:22 +0100 Subject: [PATCH 2/8] Don't add empty process items to list of currently running processes in a window --- src/MainWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 1638201d..964c2774 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -535,6 +535,10 @@ bool MainWindow::queryClose() const QString defaultProc = session->program().split('/').last(); const QString currentProc = session->foregroundProcessName().split('/').last(); + + if (currentProc.isEmpty()) + continue; + if (defaultProc != currentProc) { processesRunning.append(currentProc); } From 09efc2e3b130534c63ea25fb17502e2a2b86a399 Mon Sep 17 00:00:00 2001 From: Patrick Spendrin Date: Tue, 26 Nov 2013 17:44:55 +0100 Subject: [PATCH 3/8] do not build some tests on Windows, also do not always link against konsoleprivate --- src/tests/CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 2fbbabce..7ec71f93 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -8,10 +8,12 @@ set(KONSOLE_TEST_LIBS ${QT_QTTEST_LIBRARY} konsoleprivate) ## If it's interactive, it shouldn't use kde4_add_unit_test, ## since make test is supposed to be fully automated. +if(WIN32) kde4_add_executable(PartManualTest TEST PartManualTest.cpp) target_link_libraries(PartManualTest ${KDE4_KPARTS_LIBS} ${KDE4_KPTY_LIBS} ${KONSOLE_TEST_LIBS}) +endif() kde4_add_unit_test(CharacterColorTest CharacterColorTest.cpp) target_link_libraries(CharacterColorTest ${KONSOLE_TEST_LIBS}) @@ -21,14 +23,16 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") target_link_libraries(DBusTest ${KONSOLE_TEST_LIBS}) endif() -kde4_add_unit_test(HistoryTest HistoryTest.cpp) -target_link_libraries(HistoryTest ${KONSOLE_TEST_LIBS}) +kde4_add_unit_test(HistoryTest HistoryTest.cpp ../History.cpp) +set_target_properties(HistoryTest PROPERTIES COMPILE_FLAGS -DKONSOLEPRIVATE_EXPORT=) +target_link_libraries(HistoryTest ${QT_QTTEST_LIBRARY}) -kde4_add_unit_test(KeyboardTranslatorTest KeyboardTranslatorTest.cpp) -target_link_libraries(KeyboardTranslatorTest ${KONSOLE_TEST_LIBS}) +kde4_add_unit_test(KeyboardTranslatorTest KeyboardTranslatorTest.cpp ../KeyboardTranslator.cpp) +set_target_properties(KeyboardTranslatorTest PROPERTIES COMPILE_FLAGS -DKONSOLEPRIVATE_EXPORT=) +target_link_libraries(KeyboardTranslatorTest ${QT_QTTEST_LIBRARY}) -if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT WIN32) kde4_add_unit_test(PartTest PartTest.cpp) target_link_libraries(PartTest ${KDE4_KPARTS_LIBS} ${KDE4_KPTY_LIBS} @@ -38,8 +42,10 @@ endif() kde4_add_unit_test(ProfileTest ProfileTest.cpp) target_link_libraries(ProfileTest ${KONSOLE_TEST_LIBS}) +if(NOT WIN32) kde4_add_unit_test(PtyTest PtyTest.cpp) target_link_libraries(PtyTest ${KDE4_KPTY_LIBS} ${KONSOLE_TEST_LIBS}) +endif() kde4_add_unit_test(SessionTest SessionTest.cpp) target_link_libraries(SessionTest ${KONSOLE_TEST_LIBS}) From 5f378260e429b12177f873c179d92046500e70df Mon Sep 17 00:00:00 2001 From: Patrick Spendrin Date: Tue, 26 Nov 2013 17:54:00 +0100 Subject: [PATCH 4/8] we still need the KDE libraries, so revert the last patch in parts --- src/tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 7ec71f93..a91963e1 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -8,7 +8,7 @@ set(KONSOLE_TEST_LIBS ${QT_QTTEST_LIBRARY} konsoleprivate) ## If it's interactive, it shouldn't use kde4_add_unit_test, ## since make test is supposed to be fully automated. -if(WIN32) +if(NOT WIN32) kde4_add_executable(PartManualTest TEST PartManualTest.cpp) target_link_libraries(PartManualTest ${KDE4_KPARTS_LIBS} ${KDE4_KPTY_LIBS} @@ -25,12 +25,12 @@ endif() kde4_add_unit_test(HistoryTest HistoryTest.cpp ../History.cpp) set_target_properties(HistoryTest PROPERTIES COMPILE_FLAGS -DKONSOLEPRIVATE_EXPORT=) -target_link_libraries(HistoryTest ${QT_QTTEST_LIBRARY}) +target_link_libraries(HistoryTest ${KONSOLE_TEST_LIBS}) kde4_add_unit_test(KeyboardTranslatorTest KeyboardTranslatorTest.cpp ../KeyboardTranslator.cpp) set_target_properties(KeyboardTranslatorTest PROPERTIES COMPILE_FLAGS -DKONSOLEPRIVATE_EXPORT=) -target_link_libraries(KeyboardTranslatorTest ${QT_QTTEST_LIBRARY}) +target_link_libraries(KeyboardTranslatorTest ${KONSOLE_TEST_LIBS}) if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT WIN32) kde4_add_unit_test(PartTest PartTest.cpp) From 7f0a43eddfe31e049ec6a563868b70283b8729f8 Mon Sep 17 00:00:00 2001 From: Patrick Spendrin Date: Tue, 26 Nov 2013 19:38:35 +0100 Subject: [PATCH 5/8] minor windows build fix --- src/ProfileList.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ProfileList.cpp b/src/ProfileList.cpp index b72e1e46..d4ad2cc9 100644 --- a/src/ProfileList.cpp +++ b/src/ProfileList.cpp @@ -32,6 +32,7 @@ // Konsole #include "ProfileManager.h" +using Konsole::Profile; using Konsole::ProfileList; ProfileList::ProfileList(bool addShortcuts , QObject* parent) From 71aa21cb9b427e6416b74d065a8f2944c8cd0d49 Mon Sep 17 00:00:00 2001 From: Patrick Spendrin Date: Tue, 26 Nov 2013 20:36:10 +0100 Subject: [PATCH 6/8] fall back to the correct programs on windows --- src/Session.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Session.cpp b/src/Session.cpp index e27bf789..21d82272 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -441,7 +441,12 @@ void Session::run() const int CHOICE_COUNT = 3; // if '_program' is empty , fall back to default shell. If that is not set // then fall back to /bin/sh +#ifndef _WIN32 QString programs[CHOICE_COUNT] = {_program, qgetenv("SHELL"), "/bin/sh"}; +#else + // on windows, fall back to %COMSPEC% or to cmd.exe + QString programs[CHOICE_COUNT] = {_program, qgetenv("COMSPEC"), "cmd.exe"}; +#endif QString exec; int choice = 0; while (choice < CHOICE_COUNT) { From 65ab0daec1745acd391776110ddeeaec26fb3bdb Mon Sep 17 00:00:00 2001 From: Patrick Spendrin Date: Tue, 26 Nov 2013 21:00:10 +0100 Subject: [PATCH 7/8] do not build UnixProcessInfo on Windows --- src/ProcessInfo.cpp | 2 ++ src/ProcessInfo.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ProcessInfo.cpp b/src/ProcessInfo.cpp index 1ad05fdd..22b4dd87 100644 --- a/src/ProcessInfo.cpp +++ b/src/ProcessInfo.cpp @@ -363,6 +363,7 @@ void NullProcessInfo::readUserName() { } +#if !defined(Q_OS_WIN) UnixProcessInfo::UnixProcessInfo(int aPid, bool enableEnvironmentRead) : ProcessInfo(aPid, enableEnvironmentRead) { @@ -413,6 +414,7 @@ void UnixProcessInfo::readUserName() } delete [] getpwBuffer; } +#endif #if defined(Q_OS_LINUX) class LinuxProcessInfo : public UnixProcessInfo diff --git a/src/ProcessInfo.h b/src/ProcessInfo.h index 9d0c3a57..73a84130 100644 --- a/src/ProcessInfo.h +++ b/src/ProcessInfo.h @@ -346,6 +346,7 @@ protected: virtual void readUserName(void); }; +#if !defined(Q_OS_WIN) /** * Implementation of ProcessInfo for Unix platforms which uses * the /proc filesystem @@ -397,6 +398,7 @@ private: */ virtual bool readCurrentDir(int pid) = 0; }; +#endif /** * Lightweight class which provides additional information about SSH processes. From be6bf3a1d46e793332d1df37648c6fdfea69387e Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 27 Nov 2013 20:09:56 +0100 Subject: [PATCH 8/8] Unset pointing hand cursor if set and not over a link Acked by Martin Sandsmark REVIEW: 114147 --- src/TerminalDisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp index 6f6b98d9..84a8bd0e 100644 --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -1987,7 +1987,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev) update(_mouseOverHotspotArea | previousHotspotArea); } } else if (!_mouseOverHotspotArea.isEmpty()) { - if (_underlineLinks && (_openLinksByDirectClick || (ev->modifiers() & Qt::ControlModifier))) + if ((_underlineLinks && (_openLinksByDirectClick || (ev->modifiers() & Qt::ControlModifier))) || (cursor().shape() == Qt::PointingHandCursor)) setCursor(_mouseMarks ? Qt::IBeamCursor : Qt::ArrowCursor); update(_mouseOverHotspotArea);