From 66dac226928a08d2c7173aacdf9f8a12b473b4f8 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Sun, 25 Sep 2016 22:06:53 +0200 Subject: [PATCH] Cherry-picking upstream release: 0.7.0 * Bumped compat to 10 * Bumped build dependency debhelper (>= 10) * Bumped build dependency liblxqt-dev (>= 0.11.0) * Removed --parallel from rules, standard in compat 10 * Fixed Symbols for amd64 --- CHANGELOG | 184 +++++++++++++++++++ CMakeLists.txt | 2 +- README.md | 38 ++-- debian/.gitignore | 1 + debian/changelog | 11 ++ debian/control | 6 +- debian/copyright | 2 +- debian/libqtermwidget5-0.symbols | 101 +++++----- debian/rules | 1 - lib/Session.cpp | 10 + lib/Session.h | 4 + lib/color-schemes/Solarized.colorscheme | 93 ++++++++++ lib/color-schemes/SolarizedLight.colorscheme | 93 ++++++++++ lib/qtermwidget.cpp | 27 +-- lib/qtermwidget.h | 8 +- 15 files changed, 487 insertions(+), 94 deletions(-) create mode 100644 CHANGELOG create mode 100644 lib/color-schemes/Solarized.colorscheme create mode 100644 lib/color-schemes/SolarizedLight.colorscheme 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 7e10d4c..bf05949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ 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}") diff --git a/README.md b/README.md index 6a39ff1..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 e639f61..43d929b 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -2,6 +2,7 @@ /*.log /*.mangled /*.substvars +/debhelper-build-stamp /files /libqtermwidget5-0-dev/ diff --git a/debian/changelog b/debian/changelog index 330faab..8cd6e02 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +qtermwidget (0.7.0-1) experimental; urgency=medium + + * Cherry-picking upstream release: 0.7.0 + * Bumped compat to 10 + * Bumped build dependency debhelper (>= 10) + * Bumped build dependency liblxqt-dev (>= 0.11.0) + * Removed --parallel from rules, standard in compat 10 + * Fixed Symbols for amd64 + + -- Alf Gaida Sun, 25 Sep 2016 22:07:18 +0200 + qtermwidget (0.6.1~85-ge6253c0-1) experimental; urgency=medium * Cherry-picking upstream version 0.6.1~85-ge6253c0. diff --git a/debian/control b/debian/control index 4b94139..80694d1 100644 --- a/debian/control +++ b/debian/control @@ -7,12 +7,10 @@ Section: libs Priority: optional Build-Depends: debhelper (>= 10), cmake (>= 3.0.2), - gcc (>= 4:6), - g++ (>= 4:6), - liblxqt0-dev (>= 0.10.96~), + 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/experimental +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/qtermwidget.git/?h=debian/experimental Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/qtermwidget.git -b debian/experimental Homepage: https://github.com/lxde/qtermwidget 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 4403f42..9a99de5 100644 --- a/debian/libqtermwidget5-0.symbols +++ b/debian/libqtermwidget5-0.symbols @@ -41,7 +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.6.1~ + (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 @@ -100,7 +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.6.1~ + (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 @@ -120,8 +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.6.1~ - (c++)"Konsole::Emulation::programBracketedPasteMode() const@Base" 0.6.1~ + (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 @@ -541,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 @@ -613,7 +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.6.1~ + (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 @@ -692,20 +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.6.1~ + (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(QTermWidget::KeyboardCursorShape)@Base" 0.6.1~ + (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(QTermWidget::ScrollBarPosition)@Base" 0.6.1~ + (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 @@ -818,7 +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.6.1~ + (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 @@ -881,7 +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.6.1~ + (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 @@ -904,13 +905,13 @@ 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.1~ + (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.1~ - (c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.1~ + (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 @@ -924,7 +925,7 @@ 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.1~ + (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 @@ -950,10 +951,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.6.1~ + (c++)"QList::reserve(int)@Base" 0.7.0 (c++)"QTermWidget::activity()@Base" 0.6.0 - (c++)"QTermWidget::addCustomColorSchemeDir(QString const&)@Base" 0.6.1~ + (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 @@ -974,8 +975,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::iconText() const@Base" 0.6.1~ + (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 @@ -997,7 +999,6 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (c++)"QTermWidget::sendData(char const*, int)@Base" 0.6.0 (c++)"QTermWidget::sendText(QString const&)@Base" 0.6.0 (c++)"QTermWidget::sessionFinished()@Base" 0.6.0 - (c++)"QTermWidget::sessionTitleChanged()@Base" 0.6.1~ (c++)"QTermWidget::setArgs(QStringList const&)@Base" 0.6.0 (c++)"QTermWidget::setColorScheme(QString const&)@Base" 0.6.0 (c++)"QTermWidget::setEnvironment(QStringList const&)@Base" 0.6.0 @@ -1005,7 +1006,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.6.1~ + (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 @@ -1028,14 +1029,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.6.1~ + (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::userTitle() const@Base" 0.6.1~ (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 @@ -1101,13 +1102,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.6.1~ + (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.6.1~ + (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 @@ -1149,34 +1150,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.6.1~ + (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.6.1~ + (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()#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()#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.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 @@ -1213,18 +1214,18 @@ 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.6.1~ + (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.6.1~ + (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++)"add_custom_color_scheme_dir(QString const&)@Base" 0.6.1~ - (optional|c++)"get_color_schemes_dirs()@Base" 0.6.1~ + (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++)"string_width(QString const&)@Base" 0.6.0 @@ -1232,10 +1233,8 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (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.6.1~ - (optional|c++)"QHash::findNode(Konsole::Session* const&, unsigned int) const@Base" 0.6.1~ + (optional|c++)"QHash::findNode(Konsole::Session* const&, unsigned int*) const@Base" 0.7.0 - (optional|c++)"QHash::remove(Konsole::Session* const&)@Base" 0.6.1~ (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 @@ -1244,8 +1243,8 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (optional|c++)"QHash::deleteNode2(QHashData::Node*)@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.6.1~ - (optional|c++)"QHash::findNode(int const&, unsigned int) const@Base" 0.6.1~ + (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 @@ -1288,7 +1287,7 @@ libqtermwidget5.so.0 libqtermwidget5-0 #MINVER# (optional|c++)"QList::detach_helper(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.6.1~ + (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 diff --git a/debian/rules b/debian/rules index 4a0b6d7..912898f 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh ${@} --buildsystem cmake \ - --parallel\ --fail-missing override_dh_auto_configure: diff --git a/lib/Session.cpp b/lib/Session.cpp index 2e3e4ce..fb7ca67 100644 --- a/lib/Session.cpp +++ b/lib/Session.cpp @@ -58,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 @@ -332,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; @@ -339,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; @@ -364,6 +367,7 @@ void Session::setUserTitle( int what, const QString & caption ) } if (what == 30) { + _isTitleChanged = true; if ( _nameTitle != caption ) { setTitle(Session::NameRole,caption); return; @@ -378,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; @@ -681,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/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/qtermwidget.cpp b/lib/qtermwidget.cpp index fdbd384..2f3fd9a 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -302,7 +302,7 @@ void QTermWidget::init(int startnow) 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, SIGNAL(titleChanged()), this, SLOT(sessionTitleChanged())); + connect(m_impl->m_session, &Session::titleChanged, this, &QTermWidget::titleChanged); } @@ -485,12 +485,6 @@ void QTermWidget::sessionFinished() emit finished(); } -void QTermWidget::sessionTitleChanged() -{ - emit titleChanged(); -} - - void QTermWidget::copyClipboard() { m_impl->m_terminalDisplay->copyClipboard(); @@ -661,12 +655,23 @@ void QTermWidget::setKeyboardCursorShape(KeyboardCursorShape shape) m_impl->m_terminalDisplay->setKeyboardCursorShape(shape); } -QString QTermWidget::userTitle() const +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 { - return m_impl->m_session->userTitle(); + QString icon = m_impl->m_session->iconText(); + if (icon.isEmpty()) + icon = m_impl->m_session->iconName(); + return icon; } -QString QTermWidget::iconText() const +bool QTermWidget::isTitleChanged() const { - return m_impl->m_session->iconText(); + return m_impl->m_session->isTitleChanged(); } diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index 1ecbc51..d2c92cd 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -205,8 +205,11 @@ public: */ void setKeyboardCursorShape(KeyboardCursorShape shape); - QString userTitle() const; - QString iconText() const; + QString title() const; + QString icon() const; + + /** True if the title() or icon() was (ever) changed by the session. */ + bool isTitleChanged() const; signals: void finished(); @@ -265,7 +268,6 @@ protected: protected slots: void sessionFinished(); - void sessionTitleChanged(); void selectionChanged(bool textSelected); private slots: