Commit Graph

4 Commits

Author SHA1 Message Date
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
Petr Vanek 4010729f1a fixed #17 lib/ShellCommand.cpp:66: possible =/== mixup 2014-04-18 10:27:41 +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