diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..5c04338 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,184 @@ + +qtermwidget-0.7.0 / 2016-09-24 +============================== + + * Bump version to 0.7.0 (#92) + * Add Solarized Color Schemes + * Update README.md + * qtermwidget: Unify title & icon propagation + * lib: Fix FTBFS (struct vs. class mismatch) + * Add 'const' decorators + * Expose titleChanged() signal + * Fix building instructions + * cmake support changes + * Make addCustomColorSchemeDir() static and check for duplicates + * Address review comments + * Allow app to add custom color sheme locations + * Avoid enums duplication + * Add support for setting keyboard cursor shape + * Remove assignment to self + * Backport konsole changes to fix memory leaks + * Remove __FILE__ macros + * Replace assert() with Q_ASSERT() + * Fix ASan error about delete size mismatch + * Add support for GNU/Hurd to kpty.cpp. + * fixes kfreebsd builds on debian and derivatives + * Fix indenations (misleading-indentation warning) + * Remove Q_DECL_OVERRIDE macros + * typo Higlight + * Remove noisy qDebugs + * Bracketed paste mode implementation + * Use function setWorldTranfer for Qpainter instead of setWorldMatrix + * Modify treatment drawing double width character + * pyqt5 bindings + * pyqt5 bindings + * Avoid checking uninitialized member + simplify condition + * Use markdown for README and improve it a bit + * Remove support for Qt <= 5.4 + * Remove Designer plugin + * Fix LICENSE text and name + * Remove Changelog + * Remove empty TODO file + * Remove PyQt4 bindings + * Sort out terminal resizing + * Rebase Vt102Emulation to Konsole + * Enable terminal resizing from the emulator + * Clean up trailing whitespaces + * implemented start TTY for external recipient; + * Fix: typo in TerminalDisplay + * add method for get pty slave fd; + * add method for get pty slave fd; + * Use GNUInstallDirs in CMakeLists.txt to stop hardcoding paths + * Set the '_notifiedActivity' flag early + * Also expose signals and slots to pyqt + * Get/set selection end in python bindings + * Avoid calling winId() on Qt5. + * Fix TerminalDisplay::getCharacterPosition for proportional fonts + * Handle proportional fonts a bit better + * Expose more functionality through the python bindings (#23) + * Allow stopping test.py with ctrl-C + * Fix 'getSelectionEnd' + * Make whitespace consistent (tabs->spaces) + * Fix python binding compile errors #23 + * Add event to notify the application that the shell application uses mouse. + * Change mouseMarks only when needed. This might be useful if an application wants to be notified of the event. + * Prevents deleting the last line when resizing. + +0.6.0 / 2014-10-21 +================== + + * Release 0.6.0 + * Update AUTHORS + * Update INSTALL instructions + * CMakeLists.txt cleanup + * osx: link fixes + * fixed #57 Linux emulation does not seem to support Ctrl+Arrows (warning: I have no clue what I did...) + * Fix Qt4 compilation + * qterminal #64 No drag & drop support + * fixed qterminal #71 qt5 version ignoring page up / down + * Fixed a typo in CMakeLists.txt. + +0.5.1 / 2014-07-14 +================== + + * fixed 'make dist'; version bump + * Url activation & filters #21 + * Proxy activity/silence methods to Session in QTermWidget. + * Emit activity() and silence() signals instead of KNotification. + * Support bells. + * Support bells. + * Added QTermWidget::urlActivated(QUrl) signal. + * Emit UrlFilter::activated() instead of QDesktopServices::openUrl(). + * Derive Filter from QObject. + * Add UrlFilter. + * Activate link filters on ctrl+click. + * Update filters on resize and screen events. + * Const-correctness for QTermWidget API. + * Load arbitrary schemes by path via setColorScheme(). + * ColorSchemeManager::loadCustomColorScheme(const QString& path). + * Unified schemeName() usage. + * fixed #17 lib/ShellCommand.cpp:66: possible =/== mixup + * Delete CMakeLists.txt.user + * new API selectedText() + * new API methods (thanks to William Brumley) + * fixed #11 compile against Qt 5 (Qt4 and Qt5 supported and waguely tested) + * build simplified: qtermwidget is versioned (libqtermwidget4 for Qt4, 5 for Qt5...). Better cmake support. + * fixed broken API for sendText() - const missing + * mail address change + * Current Working Directory for linux. Part of #8. More implementations welcomed... + * Add a method for get working directory in class QTermWidget + * Fix missing cleanup for temporary history files + * a potential improvement for #9 font fractional pixels causes spacing errors + * fix #2 update various documentations for debian packaging + * fix #10 Update FSF address + +0.4.0 / 2013-04-16 +================== + + * readme updated + * Added pasteSelection-slot and corrected two nonsense comments + * qt/embedded doesn't ship with a Monospace font (and it won't use system fonts even if they exist). Using 'fixed' instead works fine + * Without this, the terminal display area will permanently lose focus when consoleq's Find dialog is called up. + * This is only needed when using Qt/E built for DirectFB display. DirectFB blocks SIGINT and some other signals, so any terminal app (be it Qt or otherwise) must call sigprocmask() to unblock them. Without this, ^C doesn't work. + * The control and tab keys don't work in Qt/E. This fixes it, but maybe not in the most elegant way. The trouble seems to be that _codec->fromUnicode(event->text()) doesn't handle control characters in qt-embedded. + * Fix resize label + * Search code cleanup + * Change searchbar background color to red(ish) when no match found + * Fix search, find-next when selection is one character long + * Hotkeys for search: Return->find-next, Shift-Return->find-previous, Escape->hide searchbar + * Added search functionality + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Fix logical error + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add Shift+KeyEnd and Shift+KeyHome to go line 0 and line end. No move screenwindow when copy and paste with keyboard + * fix for text drawing in qt>=4.8,x + * constructor for Qt Designer + * test commit + * clear() slot implemented + * fix the scroll at the end again + * The escape key is always needed for terminal programs like vim. + * Add resource files and the appropriate paths to enable bundling of color schemes and keyboard layouts into the actual executable. + * Add a define which will be used to bundle the color schemes and keyboard layouts as resource files with the executable itself instead of putting them on disk. + * scrollToEnd() method provided to trigger 'snapping' the terminal to cursor tracked position (typically the extreme value of the scrollbar, or the 'end') Some signal-fu particular to keyPressEvent(QKeyEvent *) done to make the above usable, no existing dependent implementations should be disturbed by this. + * revert workaround for key on end + * scroll to bottom on input + * scrollToEnd() method provided to trigger 'snapping' the terminal to cursor tracked position (typically the extreme value of the scrollbar, or the 'end') Some signal-fu particular to keyPressEvent(QKeyEvent *) done to make the above usable, no existing dependent implementations should be disturbed by this. + * improved sample app for testing + * macosx compile fix + * arguments work correctly for custom shells too + * lib has to be built first in any case + * merge changes from the experimental "bundle" repository + * fix for kb-layout location on mac (mainly) + * rpm builds + * mac universal build helper + * build cleanup; make dist; various readmes updated + * make availableKeyBindings static + * transparency support + * font display fix on mac (widths in int) + * qt designer plugin + * correct lib ID for mac + * remove the KDE legacy code + * code reformatted after resync + * display stuff synced from konsole again to improve color scheme handling + * focus in/out signals + * correct shell detection (BSD, Christopher VdoP) + * library location on BSD + * patches to build on BSD by Christopher VdoP + * K&R formatting + * K&R formatting + * merge with qscite + * fixed KB finding + sort + * key layouts can be read and provided to widget + * install keyboard bindings; handle KB in src code; allow to get and set KB + * fix for includes and 64bit builds + * port to macosx + * initial import diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e73db2..bf05949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,20 +1,35 @@ -cmake_minimum_required( VERSION 2.8 ) +cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(qtermwidget) -option(BUILD_TEST "Build test application. Default OFF." OFF) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") +include(GNUInstallDirs) +include(CheckFunctionExists) +option(BUILD_TEST "Build test application. Default OFF." OFF) # just change version for releases set(QTERMWIDGET_VERSION_MAJOR "0") -set(QTERMWIDGET_VERSION_MINOR "6") +set(QTERMWIDGET_VERSION_MINOR "7") set(QTERMWIDGET_VERSION_PATCH "0") set(QTERMWIDGET_VERSION "${QTERMWIDGET_VERSION_MAJOR}.${QTERMWIDGET_VERSION_MINOR}.${QTERMWIDGET_VERSION_PATCH}") -include(CheckFunctionExists) -include(GNUInstallDirs) +# additional cmake files +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +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() include_directories( "${CMAKE_SOURCE_DIR}/lib" diff --git a/README.md b/README.md index 222e2fd..d2dafdf 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,28 @@ # QTermWidget -A terminal emulator widget for Qt 5. +## Overview -QTermWidget is an opensource project originally based on KDE4 Konsole application, -but it took its own direction later. -The main goal of this project is to provide unicode-enabled, embeddable -Qt widget for using as a built-in console (or terminal emulation widget). +A terminal emulator widget for Qt 5. -# Installation +QTermWidget is an open-source project originally based on KDE4 Konsole application, but it took its own direction later. +The main goal of this project is to provide a unicode-enabled, embeddable Qt widget for using as a built-in console (or terminal emulation widget). -Requirements: - * Qt >= 5.4 - * cmake >= 3.0 +It is compatible with BSD, Linux and OS X. -Supported platforms: - * Linux - * BSD - * OS X +This project is licensed under the terms of the [GPLv2](https://www.gnu.org/licenses/gpl-2.0.en.html) or any later version. See the LICENSE file for the full text of the license. -Building +## Installation - 1. `mkdir -p build && cd build` - 2. `cmake `` - 3. make +### Compiling sources -Run `make install` to install. +The only runtime dependency is qtbase ≥ 5.4. +In order to build CMake ≥ 3.0 is needed as well as optionally Git to pull latest VCS checkouts. -# License +Code configuration is handled by CMake. Building out of source is strongly recommended. CMake variable `CMAKE_INSTALL_PREFIX` will normally have to be set to `/usr`, depending on the way library paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well. -This project is licensed under the terms of the -[GPLv2](https://www.gnu.org/licenses/gpl-2.0.en.html) or any later version. +To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual. -See the LICENSE file for the full text of the license. +### Binary packages + +The library is provided by all major Linux distributions like Arch Linux, Debian, Fedora and openSUSE. +Just use the distributions' package managers to search for string `qtermwidget`. diff --git a/debian/.gitignore b/debian/.gitignore index d82daa9..43d929b 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -1,8 +1,8 @@ -/debhelper-build-stamp -/*.debhelper/ +/*.debhelper /*.log /*.mangled /*.substvars +/debhelper-build-stamp /files /libqtermwidget5-0-dev/ diff --git a/debian/changelog b/debian/changelog index feeaf60..cf3ca8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +qtermwidget (0.7.0-4) unstable; urgency=medium + + * Cherry-picking upstream release: 0.7.0 + * Bumped compat to 10 + * Removed --parallel from rules, standard in compat 10 + * Bumped minimum version debhelper (>= 10) + * Added build dependency liblxqt-dev (>= 0.11.0) + * Followed Multiarch hinter suggestions + - qtermwidget5-data marked as Multi-Arch: foreign + - libqtermwidget5-0 marked as Multi-Arch: same + - libqtermwidget5-0-dev marked as Multi-Arch: same + * Simplified optional symbols + + -- Alf Gaida Tue, 18 Oct 2016 21:16:57 +0200 + qtermwidget (0.6.1~55-gd572f39-1) unstable; urgency=medium * Bump version to 0.6.1~ diff --git a/debian/control b/debian/control index 40d6b97..66939e4 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Section: libs Priority: optional Build-Depends: debhelper (>= 10), cmake (>= 3.0.2), + liblxqt0-dev (>= 0.11.0), qtbase5-dev Standards-Version: 3.9.8 Vcs-Browser: https://anonscm.debian.org/git/pkg-lxqt/qtermwidget.git/?h=debian/sid @@ -15,6 +16,7 @@ Homepage: https://github.com/lxde/qtermwidget Package: libqtermwidget5-0 Architecture: any +Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, qtermwidget5-data (= ${source:Version}), @@ -27,6 +29,7 @@ Description: Terminal emulator widget for Qt 5 (shared libraries) Package: libqtermwidget5-0-dev Architecture: any +Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, libqtermwidget5-0 (= ${binary:Version}), @@ -38,6 +41,7 @@ Description: Terminal emulator widget for Qt 5 (development files) Package: qtermwidget5-data Architecture: all +Multi-Arch: foreign Depends: ${misc:Depends}, Description: Terminal emulator widget for Qt 5 (data files) QTermWidget is a Unicode-enabled, embeddable Qt widget that can be used as diff --git a/debian/copyright b/debian/copyright index eeec159..bf40cb2 100644 --- a/debian/copyright +++ b/debian/copyright @@ -20,7 +20,7 @@ License: LGPL-2+ Files: debian/* Copyright: 2012-2016 Alf Gaida - 2012 Thorsten Wohlfarth + 2012 Thorsten Wohlfarth 2012 Henson Sturgill 2015 ChangZhuo Chen (陳昌倬) 2015 Andrew Lee (李健秋) diff --git a/debian/libqtermwidget5-0.symbols b/debian/libqtermwidget5-0.symbols index 8854bfb..33c53a1 100644 --- a/debian/libqtermwidget5-0.symbols +++ b/debian/libqtermwidget5-0.symbols @@ -41,6 +41,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::ColorScheme::foregroundColor() const@Base" 0.6.0 (c++)"Konsole::ColorScheme::getColorTable(Konsole::ColorEntry*, unsigned int) const@Base" 0.6.0 (c++)"Konsole::ColorScheme::hasDarkBackground() const@Base" 0.6.0 + (c++)"Konsole::ColorSchemeManager::addCustomColorSchemeDir(QString const&)@Base" 0.7.0 (c++)"Konsole::ColorSchemeManager::allColorSchemes()@Base" 0.6.0 (c++)"Konsole::ColorSchemeManager::~ColorSchemeManager()@Base" 0.6.0 (c++)"Konsole::ColorSchemeManager::ColorSchemeManager()@Base" 0.6.0 @@ -56,7 +57,6 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::ColorSchemeManager::loadColorScheme(QString const&)@Base" 0.6.0 (c++)"Konsole::ColorSchemeManager::loadCustomColorScheme(QString const&)@Base" 0.6.0 (c++)"Konsole::ColorSchemeManager::loadKDE3ColorScheme(QString const&)@Base" 0.6.0 - (c++)"Konsole::ColorSchemeManager::theColorSchemeManager@Base" 0.6.0 (c++)"Konsole::ColorScheme::name() const@Base" 0.6.0 (c++)"Konsole::ColorScheme::opacity() const@Base" 0.6.0 (c++)"Konsole::ColorScheme::randomizedBackgroundColor() const@Base" 0.6.0 @@ -100,6 +100,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::CompactHistoryType::isEnabled() const@Base" 0.6.0 (c++)"Konsole::CompactHistoryType::maximumLineCount() const@Base" 0.6.0 (c++)"Konsole::CompactHistoryType::scroll(Konsole::HistoryScroll*) const@Base" 0.6.0 + (c++)"Konsole::Emulation::bracketedPasteModeChanged(bool)@Base" 0.7.0 (c++)"Konsole::Emulation::bufferedUpdate()@Base" 0.6.0 (c++)"Konsole::Emulation::changeTabTextColorRequest(int)@Base" 0.6.0 (c++)"Konsole::Emulation::clearHistory()@Base" 0.6.0 @@ -119,6 +120,8 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::Emulation::metaObject() const@Base" 0.6.0 (c++)"Konsole::Emulation::outputChanged()@Base" 0.6.0 (c++)"Konsole::Emulation::profileChangeCommandReceived(QString const&)@Base" 0.6.0 + (c++)"Konsole::Emulation::programBracketedPasteModeChanged(bool)@Base" 0.7.0 + (c++)"Konsole::Emulation::programBracketedPasteMode() const@Base" 0.7.0 (c++)"Konsole::Emulation::programUsesMouseChanged(bool)@Base" 0.6.0 (c++)"Konsole::Emulation::programUsesMouse() const@Base" 0.6.0 (c++)"Konsole::Emulation::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.6.0 @@ -298,7 +301,6 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::KeyboardTranslatorManager::loadTranslator(QIODevice*, QString const&)@Base" 0.6.0 (c++)"Konsole::KeyboardTranslatorManager::loadTranslator(QString const&)@Base" 0.6.0 (c++)"Konsole::KeyboardTranslatorManager::saveTranslator(Konsole::KeyboardTranslator const*)@Base" 0.6.0 - (c++)"Konsole::KeyboardTranslatorManager::theKeyboardTranslatorManager@Base" 0.6.0 (c++)"Konsole::KeyboardTranslator::name() const@Base" 0.6.0 (c++)"Konsole::KeyboardTranslatorReader::createEntry(QString const&, QString const&)@Base" 0.6.0 (c++)"Konsole::KeyboardTranslatorReader::decodeSequence(QString const&, int&, QFlags&, QFlags&, QFlags&, QFlags&)@Base" 0.6.0 @@ -539,6 +541,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::Session::isMonitorActivity() const@Base" 0.6.0 (c++)"Konsole::Session::isMonitorSilence() const@Base" 0.6.0 (c++)"Konsole::Session::isRunning() const@Base" 0.6.0 + (c++)"Konsole::Session::isTitleChanged() const@Base" 0.7.0 (c++)"Konsole::Session::keyBindings() const@Base" 0.6.0 (c++)"Konsole::Session::lastSessionId@Base" 0.6.0 (c++)"Konsole::Session::metaObject() const@Base" 0.6.0 @@ -611,6 +614,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::TerminalDisplay::bell(QString const&)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::blinkCursorEvent()@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::blinkEvent()@Base" 0.6.0 + (c++)"Konsole::TerminalDisplay::bracketedPasteMode() const@Base" 0.7.0 (c++)"Konsole::TerminalDisplay::calcGeometry()@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::calculateTextArea(int, int, int, int, int)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::changedContentSizeSignal(int, int)@Base" 0.6.0 @@ -689,19 +693,20 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"Konsole::TerminalDisplay::setBellMode(int)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setBlinkingCursor(bool)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setBlinkingTextEnabled(bool)@Base" 0.6.0 + (c++)"Konsole::TerminalDisplay::setBracketedPasteMode(bool)@Base" 0.7.0 (c++)"Konsole::TerminalDisplay::setColorTable(Konsole::ColorEntry const*)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setFixedSize(int, int)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setFlowControlWarningEnabled(bool)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setFont(QFont const&)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setForegroundColor(QColor const&)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setKeyboardCursorColor(bool, QColor const&)@Base" 0.6.0 - (c++)"Konsole::TerminalDisplay::setKeyboardCursorShape(Konsole::TerminalDisplay::KeyboardCursorShape)@Base" 0.6.0 + (c++)"Konsole::TerminalDisplay::setKeyboardCursorShape(QTermWidget::KeyboardCursorShape)@Base" 0.7.0 (c++)"Konsole::TerminalDisplay::setLineSpacing(unsigned int)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setMotionAfterPasting(Konsole::MotionAfterPasting)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setOpacity(double)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setRandomSeed(unsigned int)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setScreenWindow(Konsole::ScreenWindow*)@Base" 0.6.0 - (c++)"Konsole::TerminalDisplay::setScrollBarPosition(Konsole::TerminalDisplay::ScrollBarPosition)@Base" 0.6.0 + (c++)"Konsole::TerminalDisplay::setScrollBarPosition(QTermWidget::ScrollBarPosition)@Base" 0.7.0 (c++)"Konsole::TerminalDisplay::setScroll(int, int)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setSelection(QString const&)@Base" 0.6.0 (c++)"Konsole::TerminalDisplay::setSize(int, int)@Base" 0.6.0 @@ -814,6 +819,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"KProcessPrivate::forwardStd(QProcess::ProcessChannel, int)@Base" 0.6.0 (c++)"KProcessPrivate::_k_forwardStderr()@Base" 0.6.0 (c++)"KProcessPrivate::_k_forwardStdout()@Base" 0.6.0 + (c++)"KProcessPrivate::~KProcessPrivate()@Base" 0.7.0 (c++)"KProcessPrivate::writeAll(QByteArray const&, int)@Base" 0.6.0 (c++)"KProcess::program() const@Base" 0.6.0 (c++)"KProcess::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.6.0 @@ -876,6 +882,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"KPtyProcess::KPtyProcess(int, QObject*)@Base" 0.6.0 (c++)"KPtyProcess::KPtyProcess(QObject*)@Base" 0.6.0 (c++)"KPtyProcess::metaObject() const@Base" 0.6.0 + (c++)"KPtyProcessPrivate::~KPtyProcessPrivate()@Base" 0.7.0 (c++)"KPtyProcess::ptyChannels() const@Base" 0.6.0 (c++)"KPtyProcess::pty() const@Base" 0.6.0 (c++)"KPtyProcess::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.6.0 @@ -898,13 +905,12 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 (c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 - (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.0 + (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.7.0 (c++)"QHash::values(int const&) const@Base" 0.6.0 (c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 (c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 - (c++)"QHash::erase(QHash::iterator)@Base" 0.6.0 - (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.0 - (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.0 + (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.7.0 + (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.7.0 (c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 (c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 @@ -918,7 +924,8 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 (c++)"QHash::remove(QString const&)@Base" 0.6.0 - (c++)"QHash::findNode(unsigned short const&, unsigned int) const@Base" 0.6.0 + (c++)"QHash::findNode(unsigned short const&, unsigned int) const@Base" 0.7.0 + (c++)"QList::~QList()@Base" 0.6.0 (c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 (c++)"QList::~QList()@Base" 0.6.0 @@ -943,7 +950,10 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QList::~QList()@Base" 0.6.0 (c++)"QList::removeAll(Konsole::TerminalDisplay* const&)@Base" 0.6.0 + (c++)"QList::reserve(int)@Base" 0.7.0 + (c++)"QTermWidget::activity()@Base" 0.6.0 + (c++)"QTermWidget::addCustomColorSchemeDir(QString const&)@Base" 0.7.0 (c++)"QTermWidget::availableColorSchemes()@Base" 0.6.0 (c++)"QTermWidget::availableKeyBindings()@Base" 0.6.0 (c++)"QTermWidget::bell(QString const&)@Base" 0.6.0 @@ -964,7 +974,9 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QTermWidget::getShellPID()@Base" 0.6.0 (c++)"QTermWidget::getTerminalFont()@Base" 0.6.0 (c++)"QTermWidget::historyLinesCount()@Base" 0.6.0 + (c++)"QTermWidget::icon() const@Base" 0.7.0 (c++)"QTermWidget::init(int)@Base" 0.6.0 + (c++)"QTermWidget::isTitleChanged() const@Base" 0.7.0 (c++)"QTermWidget::keyBindings()@Base" 0.6.0 (c++)"QTermWidget::matchFound(int, int, int, int)@Base" 0.6.0 (c++)"QTermWidget::metaObject() const@Base" 0.6.0 @@ -993,6 +1005,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QTermWidget::setFlowControlWarningEnabled(bool)@Base" 0.6.0 (c++)"QTermWidget::setHistorySize(int)@Base" 0.6.0 (c++)"QTermWidget::setKeyBindings(QString const&)@Base" 0.6.0 + (c++)"QTermWidget::setKeyboardCursorShape(QTermWidget::KeyboardCursorShape)@Base" 0.7.0 (c++)"QTermWidget::setMonitorActivity(bool)@Base" 0.6.0 (c++)"QTermWidget::setMonitorSilence(bool)@Base" 0.6.0 (c++)"QTermWidget::setMotionAfterPasting(int)@Base" 0.6.0 @@ -1015,12 +1028,14 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QTermWidget::termGetFocus()@Base" 0.6.0 (c++)"QTermWidget::termKeyPressed(QKeyEvent*)@Base" 0.6.0 (c++)"QTermWidget::termLostFocus()@Base" 0.6.0 + (c++)"QTermWidget::titleChanged()@Base" 0.7.0 + (c++)"QTermWidget::title() const@Base" 0.7.0 (c++)"QTermWidget::toggleShowSearchBar()@Base" 0.6.0 (c++)"QTermWidget::urlActivated(QUrl const&)@Base" 0.6.0 (c++)"QTermWidget::workingDirectory()@Base" 0.6.0 (c++)"QTermWidget::zoomIn()@Base" 0.6.0 (c++)"QTermWidget::zoomOut()@Base" 0.6.0 - + (c++)"QtPrivate::QSlotObject, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)@Base" 0.7.0 (c++)"QVector::operator=(QVector const&)@Base" 0.6.0 (c++)"QVector::~QVector()@Base" 0.6.0 (c++)"QVector::reallocData(int, int, QFlags)@Base" 0.6.0 @@ -1086,11 +1101,13 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"typeinfo for Konsole::UrlFilter::HotSpot@Base" 0.6.0 (c++)"typeinfo for Konsole::Vt102Emulation@Base" 0.6.0 (c++)"typeinfo for KProcess@Base" 0.6.0 + (c++)"typeinfo for KProcessPrivate@Base" 0.7.0 (c++)"typeinfo for KPty@Base" 0.6.0 (c++)"typeinfo for KPtyDevice@Base" 0.6.0 (c++)"typeinfo for KPtyDevicePrivate@Base" 0.6.0 (c++)"typeinfo for KPtyPrivate@Base" 0.6.0 (c++)"typeinfo for KPtyProcess@Base" 0.6.0 + (c++)"typeinfo for KPtyProcessPrivate@Base" 0.7.0 (c++)"typeinfo for QList@Base" 0.6.0 (c++)"typeinfo for QListSpecialMethods@Base" 0.6.0 (c++)"typeinfo for QTermWidget@Base" 0.6.0 @@ -1132,32 +1149,34 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"typeinfo name for Konsole::UrlFilter::HotSpot@Base" 0.6.0 (c++)"typeinfo name for Konsole::Vt102Emulation@Base" 0.6.0 (c++)"typeinfo name for KProcess@Base" 0.6.0 + (c++)"typeinfo name for KProcessPrivate@Base" 0.7.0 (c++)"typeinfo name for KPty@Base" 0.6.0 (c++)"typeinfo name for KPtyDevice@Base" 0.6.0 (c++)"typeinfo name for KPtyDevicePrivate@Base" 0.6.0 (c++)"typeinfo name for KPtyPrivate@Base" 0.6.0 (c++)"typeinfo name for KPtyProcess@Base" 0.6.0 + (c++)"typeinfo name for KPtyProcessPrivate@Base" 0.7.0 (c++)"typeinfo name for QList@Base" 0.6.0 (c++)"typeinfo name for QListSpecialMethods@Base" 0.6.0 (c++)"typeinfo name for QTermWidget@Base" 0.6.0 (c++)"typeinfo name for SearchBar@Base" 0.6.0 (c++)"Ui_SearchBar::setupUi(QWidget*)@Base" 0.6.0 - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#2}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#3}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#4}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#5}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#6}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#7}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#8}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#9}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#10}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#11}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#12}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#13}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#14}::operator()() const::qstring_literal@Base" 0.6.1~ - (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#15}::operator()() const::qstring_literal@Base" 0.6.1~ + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#10}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#11}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#12}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#13}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#14}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#15}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#2}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#3}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#4}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#5}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#6}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#7}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#8}::operator()() const::qstring_literal@Base" 0.7.0 + (c++)"Ui_SearchBar::setupUi(QWidget*)::{lambda()#9}::operator()() const::qstring_literal@Base" 0.7.0 (c++)"vtable for HistorySearch@Base" 0.6.0 (c++)"vtable for Konsole::AutoScrollHandler@Base" 0.6.0 (c++)"vtable for Konsole::CompactHistoryBlock@Base" 0.6.0 @@ -1194,34 +1213,76 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"vtable for Konsole::UrlFilter::HotSpot@Base" 0.6.0 (c++)"vtable for Konsole::Vt102Emulation@Base" 0.6.0 (c++)"vtable for KProcess@Base" 0.6.0 + (c++)"vtable for KProcessPrivate@Base" 0.7.0 (c++)"vtable for KPtyDevice@Base" 0.6.0 (c++)"vtable for KPtyDevicePrivate@Base" 0.6.0 (c++)"vtable for KPtyPrivate@Base" 0.6.0 (c++)"vtable for KPtyProcess@Base" 0.6.0 + (c++)"vtable for KPtyProcessPrivate@Base" 0.7.0 (c++)"vtable for QTermWidget@Base" 0.6.0 (c++)"vtable for SearchBar@Base" 0.6.0 -## optional symbols - (optional|c++)"get_color_schemes_dir()@Base" 0.6.0 - (optional|c++)"get_kb_layout_dir()@Base" 0.6.0 - (optional|c++)"moveBlock(_IO_FILE*, int, int, char*)@Base" 0.6.0 - (optional|c++)"string_width(QString const&)@Base" 0.6.0 - (optional|c++)"operator+(QString const&, char)@Base" 0.6.0 +# optional symbols + (optional|c++)"Konsole::BlockArray::at(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::at(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::decreaseBuffer(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::decreaseBuffer(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::has(unsigned int) const@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::has(unsigned long) const@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::setHistorySize(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::setHistorySize(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::setSize(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::BlockArray::setSize(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::CompactHistoryBlock::allocate(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::CompactHistoryBlock::allocate(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::CompactHistoryBlockList::allocate(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::CompactHistoryBlockList::allocate(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::CompactHistoryLine::operator new(unsigned int, Konsole::CompactHistoryBlockList&)@Base" 0.6.0 + (optional|c++)"Konsole::CompactHistoryLine::operator new(unsigned long, Konsole::CompactHistoryBlockList&)@Base" 0.6.0 + (optional|c++)"Konsole::HistoryScrollBlockArray::HistoryScrollBlockArray(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::HistoryScrollBlockArray::HistoryScrollBlockArray(unsigned long)@Base" 0.6.0 + (optional|c++)"Konsole::HistoryTypeBlockArray::HistoryTypeBlockArray(unsigned int)@Base" 0.6.0 + (optional|c++)"Konsole::HistoryTypeBlockArray::HistoryTypeBlockArray(unsigned long)@Base" 0.6.0 + (optional|c++)"QByteArray::~QByteArray()@Base" 0.6.0 + (optional|c++)"QHash::detach_helper()@Base" 0.6.0 + (optional|c++)"QHash::findNode(Konsole::Session* const&, unsigned int) const@Base" 0.7.0 + (optional|c++)"QHash::findNode(Konsole::Session* const&, unsigned int*) const@Base" 0.7.0 + (optional|c++)"QHash::remove(Konsole::Session* const&)@Base" 0.7.0 + (optional|c++)"QHash::detach_helper()@Base" 0.6.0 (optional|c++)"QHash::findNode(QString const&, unsigned int*) const@Base" 0.6.0 + (optional|c++)"QHash::values() const@Base" 0.6.0 + (optional|c++)"QHash::values() const@Base" 0.7.0 (optional|c++)"QHash::detach_helper()@Base" 0.6.0 (optional|c++)"QHash::findNode(QString const&, unsigned int*) const@Base" 0.6.0 + (optional|c++)"QHash::detach_helper()@Base" 0.6.0 + (optional|c++)"QHash::erase(QHash::const_iterator)@Base" 0.7.0 + (optional|c++)"QHash::erase(QHash::iterator)@Base" 0.6.0 (optional|c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 (optional|c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 + (optional|c++)"QHash::keys() const@Base" 0.6.0 + (optional|c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 + (optional|c++)"QHash::detach_helper()@Base" 0.6.0 + (optional|c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 + (optional|c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.7.0 + (optional|c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.7.0 + (optional|c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 + (optional|c++)"QHash::detach_helper()@Base" 0.6.0 + (optional|c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 + (optional|c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.7.0 + (optional|c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 (optional|c++)"QHash::detach_helper()@Base" 0.6.0 (optional|c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 + (optional|c++)"QLinkedList::append(QByteArray const&)@Base" 0.6.0 (optional|c++)"QLinkedList::detach_helper2(QLinkedList::iterator)@Base" 0.6.0 (optional|c++)"QLinkedList::~QLinkedList()@Base" 0.6.0 + + (optional|c++)"QList::append(Konsole::ColorScheme const* const&)@Base" 0.6.0 (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 (optional|c++)"QList::append(Konsole::CompactHistoryBlock* const&)@Base" 0.6.0 (optional|c++)"QList::detach_helper(int)@Base" 0.6.0 @@ -1229,8 +1290,8 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (optional|c++)"QList::detach_helper(int)@Base" 0.6.0 (optional|c++)"QList::QList(QList const&)@Base" 0.6.0 (optional|c++)"QList::append(Konsole::Filter* const&)@Base" 0.6.0 - (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 (optional|c++)"QList::detach_helper(int)@Base" 0.6.0 + (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 (optional|c++)"QList::removeAll(Konsole::Filter* const&)@Base" 0.6.0 (optional|c++)"QList::QList(QList const&)@Base" 0.6.0 (optional|c++)"QList::append(Konsole::Filter::HotSpot* const&)@Base" 0.6.0 @@ -1242,79 +1303,42 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (optional|c++)"QList::append(Konsole::Session* const&)@Base" 0.6.0 (optional|c++)"QList::QList(QList const&)@Base" 0.6.0 (optional|c++)"QList::append(Konsole::TerminalDisplay* const&)@Base" 0.6.0 - (optional|c++)"QList::append(int const&)@Base" 0.6.0 - (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 - (optional|c++)"QList::~QList()@Base" 0.6.0 + (optional|c++)"QList::append(QAction* const&)@Base" 0.6.0 (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 + + (optional|c++)"QList::QList(QList const&)@Base" 0.6.0 (optional|c++)"QList::append(QString const&)@Base" 0.6.0 - (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 (optional|c++)"QList::detach_helper(int)@Base" 0.6.0 + (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 (optional|c++)"QList::mid(int, int) const@Base" 0.6.0 - (optional|c++)"QList::~QList()@Base" 0.6.0 - (optional|c++)"QList::QList(QList const&)@Base" 0.6.0 + (optional|c++)"QList::operator+=(QList const&)@Base" 0.6.0 (optional|c++)"QList::removeAll(QString const&)@Base" 0.6.0 - (optional|c++)"QList::reserve(int)@Base" 0.6.1~ + (optional|c++)"QList::~QList()@Base" 0.6.0 (optional|c++)"QList::detach_helper(int)@Base" 0.6.0 (optional|c++)"QList::~QList()@Base" 0.6.0 + + (optional|c++)"QList::append(int const&)@Base" 0.6.0 + (optional|c++)"QList::detach_helper_grow(int, int)@Base" 0.6.0 + (optional|c++)"QList::~QList()@Base" 0.6.0 + (optional|c++)"QString::~QString()@Base" 0.6.0 + + (optional|c++)"QStringList::~QStringList()@Base" 0.7.0 + (optional|c++)"QVarLengthArray::realloc(int, int)@Base" 0.6.0 + (optional|c++)"QVector::QVector(int)@Base" 0.6.0 (optional|c++)"QVector::insert(Konsole::Character*, int, Konsole::Character const&)@Base" 0.6.0 (optional|c++)"QVector::resize(int)@Base" 0.6.0 (optional|c++)"QVector::~QVector()@Base" 0.6.0 - (optional|c++)"QVector::~QVector()@Base" 0.6.0 (optional|c++)"QVector::reallocData(int, int, QFlags)@Base" 0.6.0 + (optional|c++)"QVector::~QVector()@Base" 0.6.0 -## arch-bits=32 - (arch-bits=32|c++)"Konsole::BlockArray::at(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::BlockArray::decreaseBuffer(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::BlockArray::has(unsigned int) const@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::BlockArray::setHistorySize(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::BlockArray::setSize(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::CompactHistoryBlock::allocate(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::CompactHistoryBlockList::allocate(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::CompactHistoryLine::operator new(unsigned int, Konsole::CompactHistoryBlockList&)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::HistoryScrollBlockArray::HistoryScrollBlockArray(unsigned int)@Base" 0.6.0 - (arch-bits=32|c++)"Konsole::HistoryTypeBlockArray::HistoryTypeBlockArray(unsigned int)@Base" 0.6.0 - -## arch-bits=32 optional - (optional|arch-bits=32|c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 - (optional|arch-bits=32|c++)"QHash::detach_helper()@Base" 0.6.0 - (optional|arch-bits=32|c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 - (optional|arch-bits=32|c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.1~ - (optional|arch-bits=32|c++)"QHash::findNode(Konsole::Session* const&, unsigned int) const@Base" 0.6.1~ - (optional|arch-bits=32|c++)"QHash::remove(Konsole::Session* const&)@Base" 0.6.1~ - -## arch-bits=64 - (arch-bits=64|c++)"Konsole::BlockArray::at(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::BlockArray::decreaseBuffer(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::BlockArray::has(unsigned long) const@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::BlockArray::setHistorySize(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::BlockArray::setSize(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::CompactHistoryBlock::allocate(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::CompactHistoryBlockList::allocate(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::CompactHistoryLine::operator new(unsigned long, Konsole::CompactHistoryBlockList&)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::HistoryScrollBlockArray::HistoryScrollBlockArray(unsigned long)@Base" 0.6.0 - (arch-bits=64|c++)"Konsole::HistoryTypeBlockArray::HistoryTypeBlockArray(unsigned long)@Base" 0.6.0 - -## arch-bits=64 optional - (optional|arch-bits=64|c++)"QHash::deleteNode2(QHashData::Node*)@Base" 0.6.0 - (optional|arch-bits=64|c++)"QHash::detach_helper()@Base" 0.6.0 - (optional|arch-bits=64|c++)"QHash::duplicateNode(QHashData::Node*, void*)@Base" 0.6.0 - (optional|arch-bits=64|c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.0 - (optional|arch-bits=64|c++)"QHash::findNode(Konsole::Session* const&, unsigned int*) const@Base" 0.6.0 - -## some really weird symbols -## i don't want do break build with this one, so setting them optional is a good idea for now -## if the symbols file don't fully match, we can refine them with the output of the build - (optional|arch= amd64 arm64 i386 kfreebsd64 m86k powerpc ppc64 ppc64el s390x sh4 sparc64 x32 |c++)"QHash::values() const@Base" 0.6.0 - (optional|arch= armel armhf alpha hppa mips mipsel mips64el |c++)"QList::append(Konsole::ColorScheme const* const&)@Base" 0.6.0 - -## missed in arm64, armel, mips, mipsel, powerpc, ppc64el, s390x, alpha, hppa, -## m68k, mips64el, ppc64, sh4, sparc64 - (optional|c++)"QList::operator+=(QList const&)@Base" 0.6.0 - -## missed in armel, mips, mipsel, alpha, hppa, mips64el, sparc64 - (optional|c++)"QHash::keys() const@Base" 0.6.0 + (optional|c++)"add_custom_color_scheme_dir(QString const&)@Base" 0.7.0 + (optional|c++)"get_color_schemes_dirs()@Base" 0.7.0 + (optional|c++)"get_kb_layout_dir()@Base" 0.6.0 + (optional|c++)"moveBlock(_IO_FILE*, int, int, char*)@Base" 0.6.0 + (optional|c++)"operator+(QString const&, char)@Base" 0.6.0 + (optional|c++)"string_width(QString const&)@Base" 0.6.0 diff --git a/debian/rules b/debian/rules index dc176d9..912898f 100755 --- a/debian/rules +++ b/debian/rules @@ -6,8 +6,7 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: - dh ${@} --buildsystem cmake\ - --parallel\ + dh ${@} --buildsystem cmake \ --fail-missing override_dh_auto_configure: diff --git a/debian/source/options b/debian/source/options index c510180..112dfc8 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1,2 +1 @@ tar-ignore=.gitignore -tar-ignore=mangled diff --git a/lib/BlockArray.cpp b/lib/BlockArray.cpp index 3f36390..e4ccf8d 100644 --- a/lib/BlockArray.cpp +++ b/lib/BlockArray.cpp @@ -27,7 +27,6 @@ #include "BlockArray.h" // System -#include #include #include #include @@ -57,7 +56,7 @@ BlockArray::BlockArray() BlockArray::~BlockArray() { setHistorySize(0); - assert(!lastblock); + Q_ASSERT(!lastblock); } size_t BlockArray::append(Block * block) @@ -149,7 +148,7 @@ const Block * BlockArray::at(size_t i) size_t j = i; // (current - (index - i) + (index/size+1)*size) % size ; - assert(j < size); + Q_ASSERT(j < size); unmap(); Block * block = (Block *)mmap(0, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); @@ -218,7 +217,7 @@ bool BlockArray::setHistorySize(size_t newsize) return false; } - assert(!lastblock); + Q_ASSERT(!lastblock); lastblock = new Block(); size = newsize; diff --git a/lib/CharacterColor.h b/lib/CharacterColor.h index 08f44c8..2373783 100644 --- a/lib/CharacterColor.h +++ b/lib/CharacterColor.h @@ -256,13 +256,16 @@ inline bool operator != (const CharacterColor& a, const CharacterColor& b) inline const QColor color256(quint8 u, const ColorEntry* base) { // 0.. 16: system colors - if (u < 8) return base[u+2 ].color; u -= 8; - if (u < 8) return base[u+2+BASE_COLORS].color; u -= 8; + if (u < 8) return base[u+2 ].color; + u -= 8; + if (u < 8) return base[u+2+BASE_COLORS].color; + u -= 8; // 16..231: 6x6x6 rgb color cube if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0, ((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0, - ((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); u -= 216; + ((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); + u -= 216; // 232..255: gray, leaving out black and white int gray = u*10+8; return QColor(gray,gray,gray); diff --git a/lib/ColorScheme.cpp b/lib/ColorScheme.cpp index 200b991..8e38043 100644 --- a/lib/ColorScheme.cpp +++ b/lib/ColorScheme.cpp @@ -558,17 +558,13 @@ ColorSchemeManager::~ColorSchemeManager() void ColorSchemeManager::loadAllColorSchemes() { qDebug() << "loadAllColorSchemes"; - int success = 0; int failed = 0; QList nativeColorSchemes = listColorSchemes(); - QListIterator nativeIter(nativeColorSchemes); while ( nativeIter.hasNext() ) { - if ( loadColorScheme( nativeIter.next() ) ) - success++; - else + if ( !loadColorScheme( nativeIter.next() ) ) failed++; } @@ -576,9 +572,7 @@ void ColorSchemeManager::loadAllColorSchemes() QListIterator kde3Iter(kde3ColorSchemes); while ( kde3Iter.hasNext() ) { - if ( loadKDE3ColorScheme( kde3Iter.next() ) ) - success++; - else + if ( !loadKDE3ColorScheme( kde3Iter.next() ) ) failed++; } @@ -650,6 +644,11 @@ bool ColorSchemeManager::loadCustomColorScheme(const QString& path) return false; } +void ColorSchemeManager::addCustomColorSchemeDir(const QString& custom_dir) +{ + add_custom_color_scheme_dir(custom_dir); +} + bool ColorSchemeManager::loadColorScheme(const QString& filePath) { if ( !filePath.endsWith(QLatin1String(".colorscheme")) || !QFile::exists(filePath) ) @@ -686,15 +685,18 @@ bool ColorSchemeManager::loadColorScheme(const QString& filePath) } QList ColorSchemeManager::listKDE3ColorSchemes() { - QString dname(get_color_schemes_dir()); - QDir dir(dname); - QStringList filters; - filters << "*.schema"; - dir.setNameFilters(filters); - QStringList list = dir.entryList(filters); QStringList ret; - foreach(QString i, list) - ret << dname + "/" + i; + for (const QString &scheme_dir : get_color_schemes_dirs()) + { + const QString dname(scheme_dir); + QDir dir(dname); + QStringList filters; + filters << "*.schema"; + dir.setNameFilters(filters); + QStringList list = dir.entryList(filters); + for (const QString &i : list) + ret << dname + "/" + i; + } return ret; //return KGlobal::dirs()->findAllResources("data", // "konsole/*.schema", @@ -703,15 +705,18 @@ QList ColorSchemeManager::listKDE3ColorSchemes() } QList ColorSchemeManager::listColorSchemes() { - QString dname(get_color_schemes_dir()); - QDir dir(dname); - QStringList filters; - filters << "*.colorscheme"; - dir.setNameFilters(filters); - QStringList list = dir.entryList(filters); QStringList ret; - foreach(QString i, list) - ret << dname + "/" + i; + for (const QString &scheme_dir : get_color_schemes_dirs()) + { + const QString dname(scheme_dir); + QDir dir(dname); + QStringList filters; + filters << "*.colorscheme"; + dir.setNameFilters(filters); + QStringList list = dir.entryList(filters); + for (const QString &i : list) + ret << dname + "/" + i; + } return ret; // return KGlobal::dirs()->findAllResources("data", // "konsole/*.colorscheme", @@ -742,12 +747,17 @@ bool ColorSchemeManager::deleteColorScheme(const QString& name) QString ColorSchemeManager::findColorSchemePath(const QString& name) const { // QString path = KStandardDirs::locate("data","konsole/"+name+".colorscheme"); - QString path(get_color_schemes_dir() + "/"+ name + ".colorscheme"); + const QStringList dirs = get_color_schemes_dirs(); + if ( dirs.isEmpty() ) + return QString(); + + const QString dir = dirs.first(); + QString path(dir + "/"+ name + ".colorscheme"); if ( !path.isEmpty() ) - return path; + return path; //path = KStandardDirs::locate("data","konsole/"+name+".schema"); - path = get_color_schemes_dir() + "/"+ name + ".schema"; + path = dir + "/"+ name + ".schema"; return path; } @@ -777,12 +787,8 @@ const ColorScheme* ColorSchemeManager::findColorScheme(const QString& name) return 0; } } - -ColorSchemeManager* ColorSchemeManager::theColorSchemeManager = 0; -//K_GLOBAL_STATIC( ColorSchemeManager , theColorSchemeManager ) +Q_GLOBAL_STATIC(ColorSchemeManager, theColorSchemeManager) ColorSchemeManager* ColorSchemeManager::instance() { - if (! theColorSchemeManager) - theColorSchemeManager = new ColorSchemeManager(); return theColorSchemeManager; } diff --git a/lib/ColorScheme.h b/lib/ColorScheme.h index 5f2b77e..f9e619b 100644 --- a/lib/ColorScheme.h +++ b/lib/ColorScheme.h @@ -327,6 +327,14 @@ public: * @return Whether the color scheme is loaded successfully. */ bool loadCustomColorScheme(const QString& path); + + /** + * @brief Allows to add a custom location of color schemes. + * + * @param[in] custom_dir Custom location of color schemes (must end with /). + */ + void addCustomColorSchemeDir(const QString& custom_dir); + private: // loads a color scheme from a KDE 4+ .colorscheme file bool loadColorScheme(const QString& path); @@ -348,8 +356,6 @@ private: bool _haveLoadedAll; static const ColorScheme _defaultColorScheme; - - static ColorSchemeManager * theColorSchemeManager; }; } diff --git a/lib/Emulation.cpp b/lib/Emulation.cpp index cbfdbf8..42155ba 100644 --- a/lib/Emulation.cpp +++ b/lib/Emulation.cpp @@ -23,7 +23,6 @@ #include "Emulation.h" // System -#include #include #include #include @@ -55,7 +54,8 @@ Emulation::Emulation() : _codec(0), _decoder(0), _keyTranslator(0), - _usesMouse(false) + _usesMouse(false), + _bracketedPasteMode(false) { // create screens with a default size _screen[0] = new Screen(40,80); @@ -66,8 +66,10 @@ Emulation::Emulation() : QObject::connect(&_bulkTimer2, SIGNAL(timeout()), this, SLOT(showBulk()) ); // listen for mouse status changes - connect( this , SIGNAL(programUsesMouseChanged(bool)) , - SLOT(usesMouseChanged(bool)) ); + connect(this , SIGNAL(programUsesMouseChanged(bool)) , + SLOT(usesMouseChanged(bool))); + connect(this , SIGNAL(programBracketedPasteModeChanged(bool)) , + SLOT(bracketedPasteModeChanged(bool))); } bool Emulation::programUsesMouse() const @@ -80,6 +82,16 @@ void Emulation::usesMouseChanged(bool usesMouse) _usesMouse = usesMouse; } +bool Emulation::programBracketedPasteMode() const +{ + return _bracketedPasteMode; +} + +void Emulation::bracketedPasteModeChanged(bool bracketedPasteMode) +{ + _bracketedPasteMode = bracketedPasteMode; +} + ScreenWindow* Emulation::createWindow() { ScreenWindow* window = new ScreenWindow(); diff --git a/lib/Emulation.h b/lib/Emulation.h index cb680ef..57802d9 100644 --- a/lib/Emulation.h +++ b/lib/Emulation.h @@ -218,6 +218,8 @@ public: */ bool programUsesMouse() const; + bool programBracketedPasteMode() const; + public slots: /** Change the size of the emulation's image */ @@ -325,6 +327,8 @@ signals: */ void programUsesMouseChanged(bool usesMouse); + void programBracketedPasteModeChanged(bool bracketedPasteMode); + /** * Emitted when the contents of the screen image change. * The emulation buffers the updates from successive image changes, @@ -471,8 +475,11 @@ private slots: void usesMouseChanged(bool usesMouse); + void bracketedPasteModeChanged(bool bracketedPasteMode); + private: bool _usesMouse; + bool _bracketedPasteMode; QTimer _bulkTimer1; QTimer _bulkTimer2; diff --git a/lib/History.cpp b/lib/History.cpp index 476d616..e16531f 100644 --- a/lib/History.cpp +++ b/lib/History.cpp @@ -24,7 +24,6 @@ // System #include #include -#include #include #include #include @@ -110,7 +109,7 @@ HistoryFile::~HistoryFile() //to avoid this. void HistoryFile::map() { - assert( fileMap == 0 ); + Q_ASSERT( fileMap == 0 ); fileMap = (char*)mmap( 0 , length , PROT_READ , MAP_PRIVATE , ion , 0 ); @@ -119,14 +118,14 @@ void HistoryFile::map() { readWriteBalance = 0; fileMap = 0; - qDebug() << __FILE__ << __LINE__ << ": mmap'ing history failed. errno = " << errno; + //qDebug() << __FILE__ << __LINE__ << ": mmap'ing history failed. errno = " << errno; } } void HistoryFile::unmap() { int result = munmap( fileMap , length ); - assert( result == 0 ); Q_UNUSED( result ); + Q_ASSERT( result == 0 ); Q_UNUSED( result ); fileMap = 0; } @@ -502,7 +501,7 @@ void HistoryScrollBlockArray::getCells(int lineno, int colno, return; } - assert(((colno + count) * sizeof(Character)) < ENTRIES); + Q_ASSERT(((colno + count) * sizeof(Character)) < ENTRIES); memcpy(res, b->data + (colno * sizeof(Character)), count * sizeof(Character)); } @@ -513,7 +512,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count) if (!b) return; // put cells in block's data - assert((count * sizeof(Character)) < ENTRIES); + Q_ASSERT((count * sizeof(Character)) < ENTRIES); memset(b->data, 0, ENTRIES); @@ -521,7 +520,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count) b->size = count * sizeof(Character); size_t res = m_blockArray.newBlock(); - assert (res > 0); + Q_ASSERT(res > 0); Q_UNUSED( res ); m_lineLengths.insert(m_blockArray.getCurrent(), count); @@ -634,7 +633,6 @@ CompactHistoryLine::CompactHistoryLine ( const TextLine& line, CompactHistoryBlo Q_ASSERT (text!=NULL); length=line.size(); - formatLength=formatLength; wrapped=false; // record formats and their positions in the format array diff --git a/lib/KeyboardTranslator.cpp b/lib/KeyboardTranslator.cpp index 66e1a4e..856fadb 100644 --- a/lib/KeyboardTranslator.cpp +++ b/lib/KeyboardTranslator.cpp @@ -884,11 +884,8 @@ bool KeyboardTranslatorManager::deleteTranslator(const QString& name) return false; } } -//K_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager ) -KeyboardTranslatorManager* KeyboardTranslatorManager::theKeyboardTranslatorManager = 0; +Q_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager ) KeyboardTranslatorManager* KeyboardTranslatorManager::instance() { - if (! theKeyboardTranslatorManager) - theKeyboardTranslatorManager = new KeyboardTranslatorManager(); return theKeyboardTranslatorManager; } diff --git a/lib/KeyboardTranslator.h b/lib/KeyboardTranslator.h index c63060d..37efc10 100644 --- a/lib/KeyboardTranslator.h +++ b/lib/KeyboardTranslator.h @@ -456,6 +456,9 @@ public: KeyboardTranslatorManager(); ~KeyboardTranslatorManager(); + KeyboardTranslatorManager(const KeyboardTranslatorManager&) = delete; + KeyboardTranslatorManager& operator=(const KeyboardTranslatorManager&) = delete; + /** * Adds a new translator. If a translator with the same name * already exists, it will be replaced by the new translator. @@ -507,8 +510,6 @@ private: QHash _translators; // maps translator-name -> KeyboardTranslator // instance bool _haveLoadedAll; - - static KeyboardTranslatorManager * theKeyboardTranslatorManager; }; inline int KeyboardTranslator::Entry::keyCode() const { return _keyCode; } diff --git a/lib/Screen.cpp b/lib/Screen.cpp index 9ba0768..fa03652 100644 --- a/lib/Screen.cpp +++ b/lib/Screen.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -1177,7 +1176,7 @@ int Screen::copyLineToStream(int line , static const int MAX_CHARS = 1024; static Character characterBuffer[MAX_CHARS]; - assert( count < MAX_CHARS ); + Q_ASSERT( count < MAX_CHARS ); LineProperty currentLineProperties = 0; @@ -1202,9 +1201,9 @@ int Screen::copyLineToStream(int line , } // safety checks - assert( start >= 0 ); - assert( count >= 0 ); - assert( (start+count) <= history->getLineLen(line) ); + Q_ASSERT( start >= 0 ); + Q_ASSERT( count >= 0 ); + Q_ASSERT( (start+count) <= history->getLineLen(line) ); history->getCells(line,start,count,characterBuffer); @@ -1216,7 +1215,7 @@ int Screen::copyLineToStream(int line , if ( count == -1 ) count = columns - start; - assert( count >= 0 ); + Q_ASSERT( count >= 0 ); const int screenLine = line-history->getLines(); diff --git a/lib/Session.cpp b/lib/Session.cpp index f25d3d6..fb7ca67 100644 --- a/lib/Session.cpp +++ b/lib/Session.cpp @@ -26,7 +26,6 @@ #include "Session.h" // Standard -#include #include // Qt @@ -59,6 +58,7 @@ Session::Session(QObject* parent) : , _autoClose(true) , _wantedClose(false) , _silenceSeconds(10) + , _isTitleChanged(false) , _addToUtmp(false) // disabled by default because of a bug encountered on certain systems // which caused Konsole to hang when closing a tab and then opening a new // one. A 'QProcess destroyed while still running' warning was being @@ -186,6 +186,11 @@ void Session::addView(TerminalDisplay * widget) widget->setUsesMouse( _emulation->programUsesMouse() ); + connect( _emulation , SIGNAL(programBracketedPasteModeChanged(bool)) , + widget , SLOT(setBracketedPasteMode(bool)) ); + + widget->setBracketedPasteMode(_emulation->programBracketedPasteMode()); + widget->setScreenWindow(_emulation->createWindow()); } @@ -328,6 +333,7 @@ void Session::setUserTitle( int what, const QString & caption ) // (btw: what=0 changes _userTitle and icon, what=1 only icon, what=2 only _nameTitle if ((what == 0) || (what == 2)) { + _isTitleChanged = true; if ( _userTitle != caption ) { _userTitle = caption; modified = true; @@ -335,6 +341,7 @@ void Session::setUserTitle( int what, const QString & caption ) } if ((what == 0) || (what == 1)) { + _isTitleChanged = true; if ( _iconText != caption ) { _iconText = caption; modified = true; @@ -343,7 +350,7 @@ void Session::setUserTitle( int what, const QString & caption ) if (what == 11) { QString colorString = caption.section(';',0,0); - qDebug() << __FILE__ << __LINE__ << ": setting background colour to " << colorString; + //qDebug() << __FILE__ << __LINE__ << ": setting background colour to " << colorString; QColor backColor = QColor(colorString); if (backColor.isValid()) { // change color via \033]11;Color\007 if (backColor != _modifiedBackground) { @@ -360,6 +367,7 @@ void Session::setUserTitle( int what, const QString & caption ) } if (what == 30) { + _isTitleChanged = true; if ( _nameTitle != caption ) { setTitle(Session::NameRole,caption); return; @@ -374,6 +382,7 @@ void Session::setUserTitle( int what, const QString & caption ) // change icon via \033]32;Icon\007 if (what == 32) { + _isTitleChanged = true; if ( _iconName != caption ) { _iconName = caption; @@ -677,6 +686,11 @@ QString Session::iconText() const return _iconText; } +bool Session::isTitleChanged() const +{ + return _isTitleChanged; +} + void Session::setHistoryType(const HistoryType & hType) { _emulation->setHistory(hType); diff --git a/lib/Session.h b/lib/Session.h index 7d2e333..1a68f1d 100644 --- a/lib/Session.h +++ b/lib/Session.h @@ -282,6 +282,9 @@ public: /** Returns the text of the icon associated with this session. */ QString iconText() const; + /** Flag if the title/icon was changed by user/shell. */ + bool isTitleChanged() const; + /** Specifies whether a utmp entry should be created for the pty used by this session. */ void setAddToUtmp(bool); @@ -529,6 +532,7 @@ private: QString _iconName; QString _iconText; // as set by: echo -en '\033]1;IconText\007 + bool _isTitleChanged; ///< flag if the title/icon was changed by user bool _addToUtmp; bool _flowControl; bool _fullScripting; diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index b3511f5..c524802 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -318,7 +318,7 @@ TerminalDisplay::TerminalDisplay(QWidget *parent) ,_lineSelectionMode(false) ,_preserveLineBreaks(false) ,_columnSelectionMode(false) -,_scrollbarLocation(NoScrollBar) +,_scrollbarLocation(QTermWidget::NoScrollBar) ,_wordCharacters(":@-./_~") ,_bellMode(SystemBeepBell) ,_blinking(false) @@ -338,7 +338,7 @@ TerminalDisplay::TerminalDisplay(QWidget *parent) ,_colorsInverted(false) ,_blendColor(qRgba(0,0,0,0xff)) ,_filterChain(new TerminalImageFilterChain()) -,_cursorShape(BlockCursor) +,_cursorShape(QTermWidget::BlockCursor) ,mMotionAfterPasting(NoMoveScreenWindow) { // terminal applications are not designed with Right-To-Left in mind, @@ -371,6 +371,7 @@ TerminalDisplay::TerminalDisplay(QWidget *parent) // KCursor::setAutoHideCursor( this, true ); setUsesMouse(true); + setBracketedPasteMode(false); setColorTable(base_color_table); setMouseTracking(true); @@ -552,11 +553,11 @@ void TerminalDisplay::drawLineCharString( QPainter& painter, int x, int y, co painter.setPen( currentPen ); } -void TerminalDisplay::setKeyboardCursorShape(KeyboardCursorShape shape) +void TerminalDisplay::setKeyboardCursorShape(QTermWidget::KeyboardCursorShape shape) { _cursorShape = shape; } -TerminalDisplay::KeyboardCursorShape TerminalDisplay::keyboardCursorShape() const +QTermWidget::KeyboardCursorShape TerminalDisplay::keyboardCursorShape() const { return _cursorShape; } @@ -643,7 +644,7 @@ void TerminalDisplay::drawCursor(QPainter& painter, else painter.setPen(foregroundColor); - if ( _cursorShape == BlockCursor ) + if ( _cursorShape == QTermWidget::BlockCursor ) { // draw the cursor outline, adjusting the area so that // it is draw entirely inside 'rect' @@ -665,12 +666,12 @@ void TerminalDisplay::drawCursor(QPainter& painter, } } } - else if ( _cursorShape == UnderlineCursor ) + else if ( _cursorShape == QTermWidget::UnderlineCursor ) painter.drawLine(cursorRect.left(), cursorRect.bottom(), cursorRect.right(), cursorRect.bottom()); - else if ( _cursorShape == IBeamCursor ) + else if ( _cursorShape == QTermWidget::IBeamCursor ) painter.drawLine(cursorRect.left(), cursorRect.top(), cursorRect.left(), @@ -833,7 +834,7 @@ void TerminalDisplay::scrollImage(int lines , const QRect& screenWindowRegion) int scrollBarWidth = _scrollBar->isHidden() ? 0 : _scrollBar->width(); const int SCROLLBAR_CONTENT_GAP = 1; QRect scrollRect; - if ( _scrollbarLocation == ScrollBarLeft ) + if ( _scrollbarLocation == QTermWidget::ScrollBarLeft ) { scrollRect.setLeft(scrollBarWidth+SCROLLBAR_CONTENT_GAP); scrollRect.setRight(width()); @@ -1290,7 +1291,7 @@ void TerminalDisplay::paintFilters(QPainter& painter) QPoint cursorPos = mapFromGlobal(QCursor::pos()); int cursorLine; int cursorColumn; - int scrollBarWidth = (_scrollbarLocation == ScrollBarLeft) ? _scrollBar->width() : 0; + int scrollBarWidth = (_scrollbarLocation == QTermWidget::ScrollBarLeft) ? _scrollBar->width() : 0; getCharacterPosition( cursorPos , cursorLine , cursorColumn ); Character cursorCharacter = _image[loc(cursorColumn,cursorLine)]; @@ -1717,12 +1718,12 @@ void TerminalDisplay::scrollToEnd() _screenWindow->setTrackOutput( _screenWindow->atEndOfOutput() ); } -void TerminalDisplay::setScrollBarPosition(ScrollBarPosition position) +void TerminalDisplay::setScrollBarPosition(QTermWidget::ScrollBarPosition position) { if (_scrollbarLocation == position) return; - if ( position == NoScrollBar ) + if ( position == QTermWidget::NoScrollBar ) _scrollBar->hide(); else _scrollBar->show(); @@ -1827,7 +1828,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev) { int charLine = 0; int charColumn = 0; - int scrollBarWidth = (_scrollbarLocation == ScrollBarLeft) ? _scrollBar->width() : 0; + int scrollBarWidth = (_scrollbarLocation == QTermWidget::ScrollBarLeft) ? _scrollBar->width() : 0; getCharacterPosition(ev->pos(),charLine,charColumn); @@ -2487,6 +2488,15 @@ bool TerminalDisplay::usesMouse() const return _mouseMarks; } +void TerminalDisplay::setBracketedPasteMode(bool on) +{ + _bracketedPasteMode = on; +} +bool TerminalDisplay::bracketedPasteMode() const +{ + return _bracketedPasteMode; +} + /* ------------------------------------------------------------------------- */ /* */ /* Clipboard */ @@ -2508,6 +2518,11 @@ void TerminalDisplay::emitSelection(bool useXselection,bool appendReturn) if ( ! text.isEmpty() ) { text.replace('\n', '\r'); + if ( bracketedPasteMode() ) + { + text.prepend("\e[200~"); + text.append("\e[201~"); + } QKeyEvent e(QEvent::KeyPress, 0, Qt::NoModifier, text); emit keyPressedSignal(&e); // expose as a big fat keypress event @@ -2841,16 +2856,16 @@ void TerminalDisplay::calcGeometry() _scrollBar->resize(_scrollBar->sizeHint().width(), contentsRect().height()); switch(_scrollbarLocation) { - case NoScrollBar : + case QTermWidget::NoScrollBar : _leftMargin = DEFAULT_LEFT_MARGIN; _contentWidth = contentsRect().width() - 2 * DEFAULT_LEFT_MARGIN; break; - case ScrollBarLeft : + case QTermWidget::ScrollBarLeft : _leftMargin = DEFAULT_LEFT_MARGIN + _scrollBar->width(); _contentWidth = contentsRect().width() - 2 * DEFAULT_LEFT_MARGIN - _scrollBar->width(); _scrollBar->move(contentsRect().topLeft()); break; - case ScrollBarRight: + case QTermWidget::ScrollBarRight: _leftMargin = DEFAULT_LEFT_MARGIN; _contentWidth = contentsRect().width() - 2 * DEFAULT_LEFT_MARGIN - _scrollBar->width(); _scrollBar->move(contentsRect().topRight() - QPoint(_scrollBar->width()-1,0)); diff --git a/lib/TerminalDisplay.h b/lib/TerminalDisplay.h index cf4e4bb..22d5b3d 100644 --- a/lib/TerminalDisplay.h +++ b/lib/TerminalDisplay.h @@ -29,6 +29,7 @@ // Konsole #include "Filter.h" #include "Character.h" +#include "qtermwidget.h" //#include "konsole_export.h" #define KONSOLEPRIVATE_EXPORT @@ -102,23 +103,11 @@ public: /** Sets the opacity of the terminal display. */ void setOpacity(qreal opacity); - /** - * This enum describes the location where the scroll bar is positioned in the display widget. - */ - enum ScrollBarPosition - { - /** Do not show the scroll bar. */ - NoScrollBar=0, - /** Show the scroll bar on the left side of the display. */ - ScrollBarLeft=1, - /** Show the scroll bar on the right side of the display. */ - ScrollBarRight=2 - }; /** * Specifies whether the terminal display has a vertical scroll bar, and if so whether it * is shown on the left or right side of the display. */ - void setScrollBarPosition(ScrollBarPosition position); + void setScrollBarPosition(QTermWidget::ScrollBarPosition position); /** * Sets the current position and range of the display's scroll bar. @@ -200,25 +189,6 @@ public: void emitSelection(bool useXselection,bool appendReturn); - /** - * This enum describes the available shapes for the keyboard cursor. - * See setKeyboardCursorShape() - */ - enum KeyboardCursorShape - { - /** A rectangular block which covers the entire area of the cursor character. */ - BlockCursor, - /** - * A single flat line which occupies the space at the bottom of the cursor - * character's area. - */ - UnderlineCursor, - /** - * An cursor shaped like the capital letter 'I', similar to the IBeam - * cursor used in Qt/KDE text editors. - */ - IBeamCursor - }; /** * Sets the shape of the keyboard cursor. This is the cursor drawn * at the position in the terminal where keyboard input will appear. @@ -229,11 +199,11 @@ public: * * Defaults to BlockCursor */ - void setKeyboardCursorShape(KeyboardCursorShape shape); + void setKeyboardCursorShape(QTermWidget::KeyboardCursorShape shape); /** * Returns the shape of the keyboard cursor. See setKeyboardCursorShape() */ - KeyboardCursorShape keyboardCursorShape() const; + QTermWidget::KeyboardCursorShape keyboardCursorShape() const; /** * Sets the color used to draw the keyboard cursor. @@ -505,6 +475,9 @@ public slots: /** See setUsesMouse() */ bool usesMouse() const; + void setBracketedPasteMode(bool bracketedPasteMode); + bool bracketedPasteMode() const; + /** * Shows a notification that a bell event has occurred in the terminal. * TODO: More documentation here @@ -757,6 +730,7 @@ private: bool _terminalSizeStartup; bool _bidiEnabled; bool _mouseMarks; + bool _bracketedPasteMode; QPoint _iPntSel; // initial selection point QPoint _pntSel; // current selection point @@ -769,7 +743,7 @@ private: QClipboard* _clipboard; QScrollBar* _scrollBar; - ScrollBarPosition _scrollbarLocation; + QTermWidget::ScrollBarPosition _scrollbarLocation; QString _wordCharacters; int _bellMode; @@ -814,7 +788,7 @@ private: TerminalImageFilterChain* _filterChain; QRegion _mouseOverHotspotArea; - KeyboardCursorShape _cursorShape; + QTermWidget::KeyboardCursorShape _cursorShape; // custom cursor color. if this is invalid then the foreground // color of the character under the cursor is used diff --git a/lib/Vt102Emulation.cpp b/lib/Vt102Emulation.cpp index 38c6bfd..f3bf1f9 100644 --- a/lib/Vt102Emulation.cpp +++ b/lib/Vt102Emulation.cpp @@ -40,7 +40,6 @@ // Standard #include #include -#include // Qt #include @@ -1170,6 +1169,7 @@ void Vt102Emulation::resetModes() resetMode(MODE_Mouse1001); saveMode(MODE_Mouse1001); resetMode(MODE_Mouse1002); saveMode(MODE_Mouse1002); resetMode(MODE_Mouse1003); saveMode(MODE_Mouse1003); + resetMode(MODE_BracketedPaste); saveMode(MODE_BracketedPaste); resetMode(MODE_AppScreen); saveMode(MODE_AppScreen); resetMode(MODE_AppCuKeys); saveMode(MODE_AppCuKeys); @@ -1193,7 +1193,11 @@ void Vt102Emulation::setMode(int m) case MODE_Mouse1001: case MODE_Mouse1002: case MODE_Mouse1003: - emit programUsesMouseChanged(false); + emit programUsesMouseChanged(false); + break; + + case MODE_BracketedPaste: + emit programBracketedPasteModeChanged(true); break; case MODE_AppScreen : _screen[1]->clearSelection(); @@ -1223,6 +1227,10 @@ void Vt102Emulation::resetMode(int m) emit programUsesMouseChanged(true); break; + case MODE_BracketedPaste: + emit programBracketedPasteModeChanged(false); + break; + case MODE_AppScreen : _screen[0]->clearSelection(); setScreen(0); diff --git a/lib/color-schemes/Solarized.colorscheme b/lib/color-schemes/Solarized.colorscheme new file mode 100644 index 0000000..36529dd --- /dev/null +++ b/lib/color-schemes/Solarized.colorscheme @@ -0,0 +1,93 @@ +[Color0] +Color=7,54,66 + +[Color0Intense] +Color=0,43,54 + +[Color0Faint] +Color=6,48,59 + +[Color1] +Color=220,50,47 + +[Color1Intense] +Color=203,75,22 + +[Color1Faint] +Color=147,33,31 + +[Color2] +Color=133,153,0 + +[Color2Intense] +Color=88,110,117 + +[Color2Faint] +Color=94,106,0 + +[Color3] +Color=181,137,0 + +[Color3Intense] +Color=101,123,131 + +[Color3Faint] +Color=138,103,0 + +[Color4] +Color=38,139,210 + +[Color4Intense] +Color=131,148,150 + +[Color4Faint] +Color=20,77,115 + +[Color5] +Color=211,54,130 + +[Color5Intense] +Color=108,113,196 + +[Color5Faint] +Color=120,30,75 + +[Color6] +Color=42,161,152 + +[Color6Intense] +Color=147,161,161 + +[Color6Faint] +Color=24,94,88 + +[Color7] +Color=238,232,213 + +[Color7Intense] +Color=253,246,227 + +[Color7Faint] +Color=171,167,154 + +[Background] +Color=0,43,54 + +[BackgroundIntense] +Color=7,54,66 + +[BackgroundFaint] +Color=0,43,54 + +[Foreground] +Color=131,148,150 + +[ForegroundIntense] +Color=147,161,161 + +[ForegroundFaint] +Color=106,119,121 + +[General] +Description=Solarized +Opacity=1 diff --git a/lib/color-schemes/SolarizedLight.colorscheme b/lib/color-schemes/SolarizedLight.colorscheme new file mode 100644 index 0000000..cd19002 --- /dev/null +++ b/lib/color-schemes/SolarizedLight.colorscheme @@ -0,0 +1,93 @@ +[Color0] +Color=7,54,66 + +[Color0Intense] +Color=0,43,54 + +[Color0Faint] +Color=8,65,80 + +[Color1] +Color=220,50,47 + +[Color1Intense] +Color=203,75,22 + +[Color1Faint] +Color=222,81,81 + +[Color2] +Color=133,153,0 + +[Color2Intense] +Color=88,110,117 + +[Color2Faint] +Color=153,168,39 + +[Color3] +Color=181,137,0 + +[Color3Intense] +Color=101,123,131 + +[Color3Faint] +Color=213,170,49 + +[Color4] +Color=38,139,210 + +[Color4Intense] +Color=131,148,150 + +[Color4Faint] +Color=80,173,226 + +[Color5] +Color=211,54,130 + +[Color5Intense] +Color=108,113,196 + +[Color5Faint] +Color=223,92,158 + +[Color6] +Color=42,161,152 + +[Color6Intense] +Color=147,161,161 + +[Color6Faint] +Color=78,211,200 + +[Color7] +Color=238,232,213 + +[Color7Intense] +Color=253,246,227 + +[Color7Faint] +Color=238,232,213 + +[Background] +Color=253,246,227 + +[BackgroundIntense] +Color=238,232,213 + +[BackgroundFaint] +Color=253,246,227 + +[Foreground] +Color=101,123,131 + +[ForegroundIntense] +Color=88,110,117 + +[ForegroundFaint] +Color=141,172,182 + +[General] +Description=Solarized Light +Opacity=1 diff --git a/lib/kprocess.h b/lib/kprocess.h index babcc2a..ec90721 100644 --- a/lib/kprocess.h +++ b/lib/kprocess.h @@ -355,6 +355,9 @@ protected: openMode(QIODevice::ReadWrite) { } + virtual ~KProcessPrivate() + { + } void writeAll(const QByteArray &buf, int fd); void forwardStd(KProcess::ProcessChannel good, int fd); void _k_forwardStdout(); diff --git a/lib/kpty.h b/lib/kpty.h index 24457a5..ab34f6e 100644 --- a/lib/kpty.h +++ b/lib/kpty.h @@ -25,7 +25,7 @@ #include -struct KPtyPrivate; +class KPtyPrivate; struct termios; /** diff --git a/lib/kpty_p.h b/lib/kpty_p.h index 3f6bb88..4f865b8 100644 --- a/lib/kpty_p.h +++ b/lib/kpty_p.h @@ -27,7 +27,8 @@ #include -struct KPtyPrivate { +class KPtyPrivate { +public: Q_DECLARE_PUBLIC(KPty) diff --git a/lib/kptydevice.h b/lib/kptydevice.h index 3ef8d17..0fccd62 100644 --- a/lib/kptydevice.h +++ b/lib/kptydevice.h @@ -41,7 +41,7 @@ class QSocketNotifier; #define Q_DECLARE_PRIVATE_MI(Class, SuperClass) \ inline Class##Private* d_func() { return reinterpret_cast(SuperClass::d_ptr); } \ inline const Class##Private* d_func() const { return reinterpret_cast(SuperClass::d_ptr); } \ - friend class Class##Private; + friend struct Class##Private; /** * Encapsulates KPty into a QIODevice, so it can be used with Q*Stream, etc. diff --git a/lib/kptyprocess.h b/lib/kptyprocess.h index 15e4de4..1270c47 100644 --- a/lib/kptyprocess.h +++ b/lib/kptyprocess.h @@ -37,7 +37,7 @@ class KPtyDevice; -struct KPtyProcessPrivate; +class KPtyProcessPrivate; /** * This class extends KProcess by support for PTYs (pseudo TTYs). @@ -155,7 +155,8 @@ private: // private data // ////////////////// -struct KPtyProcessPrivate : KProcessPrivate { +class KPtyProcessPrivate : public KProcessPrivate { +public: KPtyProcessPrivate() : ptyChannels(KPtyProcess::NoChannels), addUtmp(false) diff --git a/lib/qtermwidget.cpp b/lib/qtermwidget.cpp index 126025a..2f3fd9a 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -296,11 +296,13 @@ void QTermWidget::init(int startnow) m_searchBar->setFont(font); setScrollBarPosition(NoScrollBar); + setKeyboardCursorShape(BlockCursor); m_impl->m_session->addView(m_impl->m_terminalDisplay); connect(m_impl->m_session, SIGNAL(resizeRequest(QSize)), this, SLOT(setSize(QSize))); connect(m_impl->m_session, SIGNAL(finished()), this, SLOT(sessionFinished())); + connect(m_impl->m_session, &Session::titleChanged, this, &QTermWidget::titleChanged); } @@ -432,6 +434,11 @@ QStringList QTermWidget::availableColorSchemes() return ret; } +void QTermWidget::addCustomColorSchemeDir(const QString& custom_dir) +{ + ColorSchemeManager::instance()->addCustomColorSchemeDir(custom_dir); +} + void QTermWidget::setSize(const QSize &size) { if (!m_impl->m_terminalDisplay) @@ -451,7 +458,7 @@ void QTermWidget::setScrollBarPosition(ScrollBarPosition pos) { if (!m_impl->m_terminalDisplay) return; - m_impl->m_terminalDisplay->setScrollBarPosition((TerminalDisplay::ScrollBarPosition)pos); + m_impl->m_terminalDisplay->setScrollBarPosition(pos); } void QTermWidget::scrollToEnd() @@ -478,7 +485,6 @@ void QTermWidget::sessionFinished() emit finished(); } - void QTermWidget::copyClipboard() { m_impl->m_terminalDisplay->copyClipboard(); @@ -641,3 +647,31 @@ int QTermWidget::getPtySlaveFd() const { return m_impl->m_session->getPtySlaveFd(); } + +void QTermWidget::setKeyboardCursorShape(KeyboardCursorShape shape) +{ + if (!m_impl->m_terminalDisplay) + return; + m_impl->m_terminalDisplay->setKeyboardCursorShape(shape); +} + +QString QTermWidget::title() const +{ + QString title = m_impl->m_session->userTitle(); + if (title.isEmpty()) + title = m_impl->m_session->title(Konsole::Session::NameRole); + return title; +} + +QString QTermWidget::icon() const +{ + QString icon = m_impl->m_session->iconText(); + if (icon.isEmpty()) + icon = m_impl->m_session->iconName(); + return icon; +} + +bool QTermWidget::isTitleChanged() const +{ + return m_impl->m_session->isTitleChanged(); +} diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index f442b16..d2c92cd 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -32,13 +32,35 @@ class QTermWidget : public QWidget { Q_OBJECT public: + /** + * This enum describes the location where the scroll bar is positioned in the display widget. + */ enum ScrollBarPosition { /** Do not show the scroll bar. */ - NoScrollBar=0, + NoScrollBar = 0, /** Show the scroll bar on the left side of the display. */ - ScrollBarLeft=1, + ScrollBarLeft = 1, /** Show the scroll bar on the right side of the display. */ - ScrollBarRight=2 + ScrollBarRight = 2 + }; + + /** + * This enum describes the available shapes for the keyboard cursor. + * See setKeyboardCursorShape() + */ + enum KeyboardCursorShape { + /** A rectangular block which covers the entire area of the cursor character. */ + BlockCursor = 0, + /** + * A single flat line which occupies the space at the bottom of the cursor + * character's area. + */ + UnderlineCursor = 1, + /** + * An cursor shaped like the capital letter 'I', similar to the IBeam + * cursor used in Qt/KDE text editors. + */ + IBeamCursor = 2 }; //Creation of widget @@ -98,6 +120,7 @@ public: */ void setColorScheme(const QString & name); static QStringList availableColorSchemes(); + static void addCustomColorSchemeDir(const QString& custom_dir); // History size for scrolling void setHistorySize(int lines); //infinite if lines < 0 @@ -176,6 +199,18 @@ public: */ int getPtySlaveFd() const; + /** + * Sets the shape of the keyboard cursor. This is the cursor drawn + * at the position in the terminal where keyboard input will appear. + */ + void setKeyboardCursorShape(KeyboardCursorShape shape); + + QString title() const; + QString icon() const; + + /** True if the title() or icon() was (ever) changed by the session. */ + bool isTitleChanged() const; + signals: void finished(); void copyAvailable(bool); @@ -199,6 +234,8 @@ signals: */ void sendData(const char *,int); + void titleChanged(); + public slots: // Copy selection to clipboard void copyClipboard(); diff --git a/lib/tools.cpp b/lib/tools.cpp index 487495d..d7054ea 100644 --- a/lib/tools.cpp +++ b/lib/tools.cpp @@ -43,36 +43,61 @@ QString get_kb_layout_dir() #endif // BUNDLE_KEYBOARDLAYOUTS } -/*! Helper function to get possible location of layout files. +/*! Helper function to add custom location of color schemes. +*/ +namespace { + QStringList custom_color_schemes_dirs; +} +void add_custom_color_scheme_dir(const QString& custom_dir) +{ + if (!custom_color_schemes_dirs.contains(custom_dir)) + custom_color_schemes_dirs << custom_dir; +} + +/*! Helper function to get possible locations of color schemes. By default the COLORSCHEMES_DIR is used (linux/BSD/macports). But in some cases (apple bundle) there can be more locations). */ -QString get_color_schemes_dir() +const QStringList get_color_schemes_dirs() { #ifdef BUNDLE_COLORSCHEMES return QLatin1String(":/"); #else // qDebug() << __FILE__ << __FUNCTION__; - QString rval = ""; + QStringList rval; QString k(COLORSCHEMES_DIR); QDir d(k); // qDebug() << "default COLORSCHEMES_DIR: " << k; if (d.exists()) - rval = k.append("/"); + rval << k.append("/"); // subdir in the app location d.setPath(QCoreApplication::applicationDirPath() + "/color-schemes/"); //qDebug() << d.path(); if (d.exists()) - rval = QCoreApplication::applicationDirPath() + "/color-schemes/"; + { + if (!rval.isEmpty()) + rval.clear(); + rval << (QCoreApplication::applicationDirPath() + "/color-schemes/"); + } #ifdef Q_WS_MAC d.setPath(QCoreApplication::applicationDirPath() + "/../Resources/color-schemes/"); if (d.exists()) - rval = QCoreApplication::applicationDirPath() + "/../Resources/color-schemes/"; + { + if (!rval.isEmpty()) + rval.clear(); + rval << (QCoreApplication::applicationDirPath() + "/../Resources/color-schemes/"); + } #endif + for (const QString& custom_dir : custom_color_schemes_dirs) + { + d.setPath(custom_dir); + if (d.exists()) + rval << custom_dir; + } #ifdef QT_DEBUG if(!rval.isEmpty()) { qDebug() << "Using color-schemes: " << rval; diff --git a/lib/tools.h b/lib/tools.h index b24d88f..455037e 100644 --- a/lib/tools.h +++ b/lib/tools.h @@ -2,9 +2,10 @@ #define TOOLS_H #include +#include QString get_kb_layout_dir(); -QString get_color_schemes_dir(); - +void add_custom_color_scheme_dir(const QString& custom_dir); +const QStringList get_color_schemes_dirs(); #endif diff --git a/pyqt/README.md b/pyqt/README.md new file mode 100644 index 0000000..71e8758 --- /dev/null +++ b/pyqt/README.md @@ -0,0 +1,34 @@ +PyQt5 Bindings for QTermWidget +============================== + + +INSTALL: +------------ +####1. Download QTermWidget -> https://github.com/lxde/qtermwidget + +####2. Compile and install it: + $ mkdir build && cd build + $ cmake .. + $ make + $ sudo make install +If `make install` command will not work just copy the `qtermwidget.so*` files to /usr/lib directory. +####3. Install PyQt5 and PyQt5-devel if not yet installed. +####4. Configure, compile and install bindings. Execute in terminal in the qtermwidget bindings folder: + + $ python config.py + $ make + $ sudo make install + +####5. You can run ./test.py to test the installed module. + + +ABOUT: +--------- +Based on previous PyQt4 bindings by: +- Piotr "Riklaunim" Maliński , +- Alexander Slesarev + + +PyQt5 QTermWidget Bindings +License: GPL3 + diff --git a/pyqt/config-old.py b/pyqt/config-old.py new file mode 100755 index 0000000..b5eb76e --- /dev/null +++ b/pyqt/config-old.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# PyQt4 bindings for th QTermWidget project. +# +# Copyright (C) 2009 Piotr "Riklaunim" Maliński , +# Alexander Slesarev +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sipconfig +from PyQt4 import pyqtconfig + +# The name of the SIP build file generated by SIP and used by the build +# system. +build_file = "qtermwidget.sbf" + +# Get the PyQt configuration information. +config = pyqtconfig.Configuration() + +# Get the extra SIP flags needed by the imported qt module. Note that +# this normally only includes those flags (-x and -t) that relate to SIP's +# versioning system. +qt_sip_flags = config.pyqt_sip_flags + +# Run SIP to generate the code. Note that we tell SIP where to find the qt +# module's specification files using the -I flag. +os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", + config.pyqt_sip_dir, qt_sip_flags, "qtermwidget.sip"])) + +# We are going to install the SIP specification file for this module and +# its configuration module. +installs = [] + +installs.append(["qtermwidget.sip", os.path.join(config.default_sip_dir, + "qtermwidget")]) + +installs.append(["qtermwidgetconfig.py", config.default_mod_dir]) + +# Create the Makefile. The QtModuleMakefile class provided by the +# pyqtconfig module takes care of all the extra preprocessor, compiler and +# linker flags needed by the Qt library. +makefile = pyqtconfig.QtGuiModuleMakefile( + configuration = config, + build_file = build_file, + installs = installs) + +# Add the library we are wrapping. The name doesn't include any platform +# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the +# ".dll" extension on Windows). +makefile.extra_lib_dirs.append("..") +makefile.extra_libs = ["qtermwidget4"] + +# Generate the Makefile itself. +makefile.generate() + +# Now we create the configuration module. This is done by merging a Python +# dictionary (whose values are normally determined dynamically) with a +# (static) template. +content = { + # Publish where the SIP specifications for this module will be + # installed. + "qtermwidget_sip_dir": config.default_sip_dir, + + # Publish the set of SIP flags needed by this module. As these are the + # same flags needed by the qt module we could leave it out, but this + # allows us to change the flags at a later date without breaking + # scripts that import the configuration module. + "qtermwidget_sip_flags": qt_sip_flags} + +# This creates the qtermwidgetconfig.py module from the qtermwidgetconfig.py.in +# template and the dictionary. +sipconfig.create_config_module("qtermwidgetconfig.py", "config.py.in", content) diff --git a/pyqt/config.py b/pyqt/config.py new file mode 100755 index 0000000..70ad215 --- /dev/null +++ b/pyqt/config.py @@ -0,0 +1,93 @@ +import os +import sipconfig +import subprocess +import os +import site +import pprint +from distutils import sysconfig +import pyqtconfig +from PyQt5 import QtCore +import PyQt5 + +class Configuration(sipconfig.Configuration): + """The class that represents PyQt configuration values. + """ + def getEnv(self,name, default): + return os.environ.get(name) or default + + def __init__(self): + qtconfig = subprocess.check_output(["/usr/lib64/qt5/bin/qmake", "-query"], universal_newlines=True) + qtconfig = dict(x.split(":", 1) for x in qtconfig.splitlines()) + + self.pyQtIncludePath = self.getEnv('PYQT_INCLUDE_PATH','/usr/share/sip/PyQt5' ) + + pyqtconfig = { + "pyqt_config_args": "--confirm-license -v "+str(self.pyQtIncludePath)+" --qsci-api -q /usr/lib64/qt5/bin/qmake", + "pyqt_version": QtCore.PYQT_VERSION, + "pyqt_version_str": QtCore.PYQT_VERSION_STR, + "pyqt_bin_dir": PyQt5.__path__[0], + "pyqt_mod_dir": PyQt5.__path__[0], + "pyqt_sip_dir": str(self.pyQtIncludePath), + "pyqt_modules": "QtCore QtGui QtWidgets", #... and many more + "pyqt_sip_flags": QtCore.PYQT_CONFIGURATION['sip_flags'], + "qt_version": QtCore.QT_VERSION, + "qt_edition": "free", + "qt_winconfig": "shared", + "qt_framework": 0, + "qt_threaded": 1, + "qt_dir": qtconfig['QT_INSTALL_PREFIX'], + "qt_data_dir": qtconfig['QT_INSTALL_DATA'], + "qt_archdata_dir": qtconfig['QT_INSTALL_DATA'], + "qt_inc_dir": qtconfig['QT_INSTALL_HEADERS'], + "qt_lib_dir": qtconfig['QT_INSTALL_LIBS'] + } + + macros = sipconfig._default_macros.copy() + macros['INCDIR_QT'] = qtconfig['QT_INSTALL_HEADERS'] + macros['LIBDIR_QT'] = qtconfig['QT_INSTALL_LIBS'] + macros['MOC'] = os.path.join(qtconfig['QT_INSTALL_BINS'], 'moc') + + sipconfig.Configuration.__init__(self, [pyqtconfig]) + self.set_build_macros(macros) + + +## The name of the SIP build file generated by SIP and used by the build system. +build_file = "qtermwidget.sbf" + +# Get the SIP configuration information. +config = Configuration() + +# Run SIP to generate the build_file +os.system(" ".join([config.sip_bin, '-I' , str(config.pyQtIncludePath), str(config.pyqt_sip_flags), "-b", build_file,"-o", "-c", ". " " qtermwidget.sip"])) + +installs = [] +installs.append(["qtermwidget.sip", os.path.join(config.pyqt_sip_dir,"qtermwidget")]) +installs.append(["qtermwidgetconfig.py", config.pyqt_mod_dir]) + +makefile = sipconfig.SIPModuleMakefile( configuration = config, build_file = build_file, installs = installs, qt=["QtCore" ,"QtGui", "QtWidgets"] ) + +# Add the library we are wrapping. The name doesn't include any platform +# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the +# ".dll" extension on Windows). +makefile.extra_lib_dirs.append("../lib/") +makefile.extra_lib_dirs.append("..") +makefile.extra_libs = ["qtermwidget5"] + +# Generate the Makefile itself. +makefile.generate() + +content = { + # Publish where the SIP specifications for this module will be + # installed. + "qtermwidget_sip_dir": config.pyqt_sip_dir, + + # Publish the set of SIP flags needed by this module. As these are the + # same flags needed by the qt module we could leave it out, but this + # allows us to change the flags at a later date without breaking + # scripts that import the configuration module. + "qtermwidget_sip_flags": config.pyqt_sip_flags + } + +# This creates the qtermwidgetconfig.py module from the qtermwidgetconfig.py.in +# template and the dictionary. +sipconfig.create_config_module("qtermwidgetconfig.py", "config.py.in", content) diff --git a/pyqt/config.py.in b/pyqt/config.py.in new file mode 100644 index 0000000..e69de29 diff --git a/pyqt/qtermwidget.sip b/pyqt/qtermwidget.sip new file mode 100644 index 0000000..51a4f80 --- /dev/null +++ b/pyqt/qtermwidget.sip @@ -0,0 +1,86 @@ +%Module QTermWidget + + + + +%Import QtGui/QtGuimod.sip +%Import QtCore/QtCoremod.sip +%Import QtWidgets/QtWidgetsmod.sip + +class QTermWidget : QWidget { + +%TypeHeaderCode +#include <../lib/qtermwidget.h> +%End + +public: + enum ScrollBarPosition + { + NoScrollBar=0, + ScrollBarLeft=1, + ScrollBarRight=2 + }; + + QTermWidget(int startnow = 1, QWidget *parent = 0); + ~QTermWidget(); + + QSize sizeHint() const; + void startShellProgram(); + int getShellPID(); + void changeDir(const QString & dir); + void setTerminalFont(QFont &font); + QFont getTerminalFont(); + void setTerminalOpacity(qreal level); + void setEnvironment(const QStringList & environment); + void setShellProgram(const QString & progname); + void setWorkingDirectory(const QString & dir); + QString workingDirectory(); + void setArgs(QStringList &args); + void setTextCodec(QTextCodec *codec); + void setColorScheme(const QString & name); + static QStringList availableColorSchemes(); + void setHistorySize(int lines); + void setScrollBarPosition(ScrollBarPosition); + void scrollToEnd(); + void sendText(QString &text); + void setFlowControlEnabled(bool enabled); + bool flowControlEnabled(); + void setFlowControlWarningEnabled(bool enabled); + static QStringList availableKeyBindings(); + QString keyBindings(); + void setMotionAfterPasting(int); + int historyLinesCount(); + int screenColumnsCount(); + void setSelectionStart(int row, int column); + void setSelectionEnd(int row, int column); + void getSelectionStart(int& row, int& column); + void getSelectionEnd(int& row, int& column); + QString selectedText(bool preserveLineBreaks = true); + void setMonitorActivity(bool); + void setMonitorSilence(bool); + void setSilenceTimeout(int seconds); +signals: + void finished(); + void copyAvailable(bool); + void termGetFocus(); + void termLostFocus(); + void termKeyPressed(QKeyEvent *); + void urlActivated(const QUrl&); + void bell(const QString& message); + void activity(); + void silence(); +public slots: + void copyClipboard(); + void pasteClipboard(); + void pasteSelection(); + void zoomIn(); + void zoomOut(); + void setKeyBindings(const QString & kb); + void clear(); + void toggleShowSearchBar(); + void setSize(const QSize&); +protected: + void resizeEvent(QResizeEvent *e); +private: + void *createTermWidget(int startnow, void *parent); +}; diff --git a/pyqt/qtermwidgetconfig.py b/pyqt/qtermwidgetconfig.py new file mode 100644 index 0000000..e69de29 diff --git a/pyqt/test.py b/pyqt/test.py new file mode 100755 index 0000000..8d82f20 --- /dev/null +++ b/pyqt/test.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# PyQt4 bindings for th QTermWidget project. +# +# Copyright (C) 2009 Piotr "Riklaunim" Maliński , +# Alexander Slesarev +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import sys, signal +from PyQt5 import QtCore,QtWidgets + +import QTermWidget + +signal.signal(signal.SIGINT, signal.SIG_DFL) +a = QtWidgets.QApplication(sys.argv) + +w = QTermWidget.QTermWidget() +w.finished.connect(a.quit) +w.show() + +a.exec_() \ No newline at end of file