Commit Graph

12 Commits

Author SHA1 Message Date
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