Commit Graph

295 Commits

Author SHA1 Message Date
eltonfabricio10 1cd6011fc3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/pt_BR/
2020-04-03 18:29:33 +00:00
Chih-Hsuan Yen e7feed379f Fix QCharRef deprecated behavior (closes #323)
Inspired by https://github.com/KDE/konsole/commit/324d78c07fc4fe2cdb2219a9e042a969df73d39c
2020-04-02 11:38:20 +08:00
Paul Galbraith 11c706d3ad rename BlockSize macro to avoid conflict with windows.h (#327)
* rename BlockSize macro to avoid conflict with windows.h

* refactor LXQT_BlockSize -> QTERMWIDGET_BlockSize

* refactor again for all caps QTERMWIDGET_BLOCKSIZE
2020-03-16 10:03:59 +08:00
Tomasz Paweł Gajc 82a919fe20 Fix build with LLVM/clang
Fix error:

/usr/bin/clang++  -DCOLORSCHEMES_DIR=\"/usr/share/qtermwidget5/color-schemes\" -DHAVE_POSIX_OPENPT -DHAVE_SYS_TIME_H -DHAVE_UPDWTMPX -DKB_LAYOUT_DIR=\"/usr/share/qtermwidget5/kb-layouts\" -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DTRANSLATIONS_DIR=\"/usr/share/qtermwidget5/translations\" -Dqtermwidget5_EXPORTS -I/builddir/build/BUILD/qtermwidget-0.14.1/build -I/builddir/build/BUILD/qtermwidget-0.14.1 -I/builddir/build/BUILD/qtermwidget-0.14.1/lib -I/builddir/build/BUILD/qtermwidget-0.14.1/build/lib -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/./mkspecs/linux-clang  -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4  -m64 -mtune=generic -flto -fno-exceptions -Wall -Wextra -Wchar-subscripts -Wno-long-long -Wpointer-arith -Wundef -Wformat-security -Wnon-virtual-dtor -Woverloaded-virtual -Wpedantic -Wno-gnu-zero-variadic-macro-arguments -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4  -m64 -mtune=generic -flto -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -fPIC -std=gnu++14 -o CMakeFiles/qtermwidget5.dir/lib/TerminalCharacterDecoder.cpp.o -c /builddir/build/BUILD/qtermwidget-0.14.1/lib/TerminalCharacterDecoder.cpp
make[2]: Leaving directory '/builddir/build/BUILD/qtermwidget-0.14.1/build'
BUILDSTDERR: /builddir/build/BUILD/qtermwidget-0.14.1/lib/TerminalCharacterDecoder.cpp:205:18: error: no member named 'iswspace' in namespace 'std'; did you mean 'isspace'?
BUILDSTDERR:         if (std::iswspace(ch))
BUILDSTDERR:             ~~~~~^~~~~~~~
BUILDSTDERR:                  isspace
BUILDSTDERR: /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/10.0.0/../../../../include/c++/10.0.0/cctype:72:11: note: 'isspace' declared here
BUILDSTDERR:   using ::isspace;
BUILDSTDERR:           ^
BUILDSTDERR: 1 error generated.
BUILDSTDERR: make[2]: *** [CMakeFiles/qtermwidget5.dir/build.make:442: CMakeFiles/qtermwidget5.dir/lib/TerminalCharacterDecoder.cpp.o] Error 1
BUILDSTDERR: make[2]: *** Waiting for unfinished jobs....
2020-03-10 18:40:29 +08:00
Luís Pereira ab81290ea7 Avoid buffer overflows exploits
sprintf() perform unbounded operations. It allows a buffer overflow
exploit.
2020-02-22 18:22:44 +01:00
Luís Pereira 59ac023f60 Drop deprecated QString::sprintf()
Made obsolete in Qt5.14.
2020-02-22 18:22:44 +01:00
Luís Pereira ae71042e0d Prevent a c++11 range-loop might detach Qt container
Just make it const.
2020-01-18 23:39:39 +01:00
Ács Zoltán e64beb4621 Translated using Weblate (Hungarian)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/hu/
2020-01-18 22:15:29 +01:00
Daniel Ruiz de Alegría 64ef5be97f Fix SearchBar light text over white background with dark themes 2019-12-25 18:10:39 +01:00
Luís Pereira 51bfdd6c0e Remove obsolete qCopy
Use std::copy instead.
2019-12-16 11:44:32 +00:00
Enol P ccf9e69fd7 Added translation using Weblate (Asturian) 2019-11-25 00:45:52 +01:00
Vadim Zabermakh 0ad6fbfa86 Macro Q_WS_MAC renamed to Q_OS_MAC. Added QLatin1String in string concatenations on MacOS 2019-11-24 16:12:40 +01:00
Masamichi Ito 17d1e4cb70 Translated using Weblate (Japanese)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/ja/
2019-11-24 15:57:52 +01:00
Alf Gaida d4896ed1b6 Translated using Weblate (German)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/de/
2019-11-10 23:11:40 +01:00
hmollercl 575064f1d1 Added translation using Weblate (Mapudungun) 2019-10-26 18:39:59 +02:00
Tsu Jan e9d6b36624 Removed some debug outputs
Users don't need to seem them. If an info is really important, it should be shown in a message box, IMHO.
2019-10-21 21:08:54 +02:00
Paulo Lieuthier a982330d05 Select all text when opening search bar 2019-10-14 02:35:54 +02:00
Einar Mostad d89ef6b0c6 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/nb_NO/
2019-10-05 15:49:40 +02:00
Alf Gaida b097f4e0c6 Translation source update 2019-09-22 20:00:03 +02:00
Pavel Shlyak 1269679b61 Session.cpp: simplify logical expression 2019-09-22 08:36:38 +02:00
Pavel Shlyak c67ea44265 Screen.h: boolean modes 2019-09-22 08:36:07 +02:00
Masamichi Ito 29c6d3cc59 Translated using Weblate (Japanese)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/ja/
2019-09-22 07:48:28 +02:00
p-bo fc74642060 Translated using Weblate (Czech)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/cs/
2019-09-22 07:48:28 +02:00
Dmitry Matrokhin 9b12c21246 Fix flickering on font change
Root cause:
When font is changed paintEvent is called and we draw text "Mq" to
calculate font height. Then on next paintEvent we draw original content.
Since it's done in 2 steps we get flickering.
Fix:
Do calculating and redrawing in 1 step.
2019-08-17 20:49:13 +02:00
Gary Wang b4b11ae719 feat: add sendKeyEvent() api 2019-08-17 20:46:44 +02:00
Masamichi Ito e9df291361 Translated using Weblate (Japanese)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/ja/
2019-08-17 15:39:16 +02:00
David H. Gutteridge 0b6b5c8bec Fix compilation on NetBSD
Like OpenBSD, NetBSD has util.h, not libutil.h.
2019-07-31 21:51:47 +08:00
BlahGeek 88e57a57fc Use QRectF for cursor drawing, fix artifacts in hidpi 2019-07-15 22:39:40 +02:00
Chih-Hsuan Yen 64fef7ab3c Allow to disable drawing line chars 2019-07-15 22:39:00 +02:00
Yen Chi Hsuan 4ffd19203a Fix numpad handling and add entries for numpad 5
KP_Clear is mapped from numpad 5 on non-Apple keyboards according to Qt
doc [1]. It's mapped from KP_Begin from XKB on X11.

Tests: with numlock off,

numpad 5 => "\e[OE"
Ctrl + numpad 5 => "\e[1;5E"
Alt + numpad 5 => "\e[1;3E"
Shift + numpad 5 => "5"

These results are the same as VTE3 0.56.3. On xterm 346, Shift + numpad
5 generates "\eO2u". However, Qt returns 5 instead of KP_Clear if Shift
is hold even with numlock off, so implementing Shift + numpad 5 might be
rather complicated. As a side note, shifted keypad sequences can be
found in emacs sources [2].

Note that on Wayfire (wlroots-based Wayland compositor), numpad 5 with
numlock off generates an event without Qt::KeypadModifier. Further
investigation needed.

Ref: https://github.com/lxqt/qtermwidget/issues/117

[1] https://doc.qt.io/qt-5/qt.html#Key-enum
[2] https://github.com/emacs-mirror/emacs/blame/master/lisp/term/xterm.el
2019-07-15 22:38:35 +02:00
Chih-Hsuan Yen 0d9c8cf0b5 Colons support in RGB definition
With this patch, non-color sequences using colons are also accepted. I
consider such sequences undefined behavior, though.

Closes https://github.com/lxqt/qterminal/issues/78
2019-07-15 21:07:20 +02:00
mscdex f4a3a6ac3f Announce truecolor support via COLORTERM 2019-07-15 21:06:08 +02:00
Chih-Hsuan Yen 2cb98f24b7 Don't set the selection clipboard if it's unsupported
Or there are warnings on macOS and Wayland. For example,

> Data set on unsupported clipboard mode. QMimeData object will be deleted.
2019-07-15 21:05:11 +02:00
Ma. Ito c10951b97c Translated using Weblate (Japanese)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/ja/
2019-06-25 13:40:43 +08:00
Anders Bakken 5637ea1e5e Add QTermWidget::saveHistory
This enables an application to implement the functionality of easily
opening the entire history as a file in your favorite editor.
2019-06-21 12:44:08 +08:00
Tsu Jan 3467ff6482 Completed the support for transient scrollbars
Transient scrollbars don't take space but that wasn't considered in a small part of the code. This patch completes https://github.com/lxqt/qtermwidget/commit/2b7c2b38edd69613f5c1ec67958c18f438d27e4f

I encountered a small problem during a big compilation (qt), made and applied the patch and, by chance, had another big compilation (qtcreator) afterward. The test was successful, as expected.
2019-05-18 23:26:22 +08:00
Luís Pereira ab49998a39 Use class instead of struct
TermWidgetImpl fits a Implementation class use.
2019-05-02 20:02:17 +08:00
eltonfabricio10 6947f7fc31 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/pt_BR/
2019-04-28 17:25:58 +02:00
Zang MingJie fcf0ebc498 Fix TerminalDisplay::getCharacterPosition memory access violation
Fix: lxqt/qtermwidget#266
2019-04-22 22:03:02 +08:00
Luís Pereira b87de89767 Use braced initializer list in returns
Replaces explicit calls to the constructor in a return with a braced
initializer list.
2019-04-13 15:49:15 +02:00
Luís Pereira 5e44880a70 Port to C++ bool literals 2019-04-13 15:49:15 +02:00
Luís Pereira 2110583a39 Port towards C++ headers 2019-04-13 15:49:15 +02:00
Luís Pereira b8906f6b0c Port towards C++11 nullptr 2019-04-13 15:49:15 +02:00
Luís Pereira 1e634114a3 Port towards C++11 override 2019-04-13 15:49:15 +02:00
Davi Lopes 8f1b40b55f Added translation using Weblate (Portuguese (Brazil)) 2019-04-07 09:58:56 +02:00
Andrew Janke 5ce909cbc2 Swap Qt::ControlModifier and Qt::MetaModifier on Mac
This is because their meaning is different there.
See https://doc.qt.io/qt-5/qt.html#KeyboardModifier-enum
2019-03-21 11:02:14 +08:00
Andrew Janke fa4a1bad42 Fix default font on macOS
Qt does not support fontconfig on macOS, so we need to work around it and
provide a "real" font family name for the default font. Otherwise, "Monospace"
will be unrecognized and it will fall back to a variable-width font.
2019-03-10 14:26:09 +08:00
roxfr 3ee4927bad Translated using Weblate (French)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/fr/
2019-03-05 23:13:19 +08:00
Andrew Janke 0086b184bf KPty: Don't conditionalize chownpty existence on HAVE_OPENPTY
This fixes the build on Mac, which is the only place where HAVE_OPENPTY
is actually defined.
2019-03-05 22:59:08 +08:00
Sérgio Marques 5a9a575d04 Translated using Weblate (Portuguese)
Currently translated at 100.0% (21 of 21 strings)

Translation: LXQt/QTermWidget
Translate-URL: https://weblate.lxqt.org/projects/lxqt/qtermwidget/pt/
2019-02-25 21:25:53 +01:00