Commit Graph

17 Commits

Author SHA1 Message Date
Chih-Hsuan Yen b09e1d4882 Revert "Rework on memory management of filter-related objects"
This reverts commit 0154e036c7.
2019-01-14 13:17:00 +08:00
Tsu Jan 13fe22aac4 Correct deleting of HotSpot list items
Fixes https://github.com/lxqt/qterminal/issues/504
2018-11-06 23:07:12 +01:00
Luís Pereira c6880070e9 Don't use automatic string conversions
* Disables automatic conversions from 8-bit strings (char *) to unicode
  QStrings.
* Disables automatic conversion from QString to 8-bit strings (char *).
* Disables automatic conversions from QByteArray to const char * or const
  void *.
* Disables automatic conversions from QString (or char *) to QUrl.
* Use QStringBuilder for more efficient string creation.

It make us aware of string and encoding conversions.
2018-08-05 22:09:57 +08:00
Tsu Jan 3838728c22 Suppress compilation warnings 2018-07-16 17:24:13 +02:00
Yen Chi Hsuan 0154e036c7 Rework on memory management of filter-related objects 2018-06-28 12:20:07 +02:00
Yen Chi Hsuan c648297792 Support UTF-32 characters correctly
By replacing QString/QChar or quint16 with std::wstring and wchar_t
2018-02-28 10:49:41 +01:00
Luís Pereira 3ce71a3650 Fixes (#122)
* Prevent a possible C++11 range for detach

The solution with Qt>=5.7 is to use the qAsConst() macro.
But the qAsConst macro is just a const_cast to const T&.

* Don't call QByteArray::operator[]() on temporary

Just use the QByteArray::at().

* Adds missing reference in foreach

That's an non non trivial type (QString), using a reference as no drawbacks
and it performs better.

* Use QStringList::constFirst()

Drop QStringList::first(). It's faster and we might avoid detaching a
temporary.

* Don't call QList::operator[]() on temporary objects

It's not what we want. The at operator and QList::value() do the job in the
right way.

* Stops allocating an unneeded temporary container

We were allocating an temporary container (_entries.values(keyCode)) which
implies an extra iteration also.
Now we don't use any temporary container and only perform one iteration.
2017-04-22 11:55:16 +02:00
Yen Chi Hsuan 08628fda19 Fix memory leak in hotspot (URLs & emails) detection 2017-03-19 22:28:59 +08:00
Yen Chi Hsuan 000fc2e8cf Preparations for context menu actions on URLs (#97)
1. Define click-action so that QTermWidget clients can tell clicking
   from context menu actions
2. Expose filterActions
2016-11-20 15:26:14 +01:00
Igor e5dbf9a359 Delete unused tooltip code (#81) 2016-10-03 21:38:18 +02:00
Jerome Leclanche 72ffc262eb Clean up trailing whitespaces 2015-07-09 20:22:48 +02:00
Petr Vanek 2bcb137a5b Url activation & filters #21 2014-07-14 13:22:13 +02:00
0xd34df00d b0c18f6561 Emit UrlFilter::activated() instead of QDesktopServices::openUrl(). 2014-05-24 03:33:52 +04:00
Petr Vanek 5d3ef34cc2 fixed #11 compile against Qt 5 (Qt4 and Qt5 supported and waguely tested) 2014-04-11 21:28:52 +02:00
Petr Vanek 6ad5d7070a merge changes from the experimental "bundle" repository 2011-06-22 13:12:21 +02:00
Petr Vanek 57fd23bf39 K&R formatting 2010-10-01 16:08:14 +02:00
Petr Vanek 88b5a11bb4 merge with qscite 2010-10-01 15:54:31 +02:00