This hides tab text in BrowsingLibrary as it would often get elided
due to insufficient space in tab bar. It's not possible to resize
the tab bar to fit the tab text as the text can be very long depending
on translation, so the only way to solve it is to just hide the text.
They can detach if the container is shared. Even if they are not shared,
using const method when possible is good practice.
Differential Revision: https://phabricator.kde.org/D9730
Cleanup the includes:
QtGlobal is not needed - already pulled in by qzcommon.h
QString not needed, already pulled in by qzcommon.h
Move the qzcommon include before the ifdefs
This is a change that has been getting used when building QupZilla on FreeBSD for several years now and works fine.
The cmdline files opened from /proc/ were not closed if reading the data
from them failed (e.g. because the file was empty). This leaked the file
descriptor which could lead to failures trying to open more files later.
Linux style brackets are now used also for source files.
One line blocks can now be without brackets.
Example:
if (test)
foo();
Multi-line if statements are now written with conditionals (||, &&, ...)
at the end of line. The last line of if body does not ends with closing
bracket, instead the closing bracket is written on separate line.
One line blocks in multi-line if statements should not be without brackets.
Example:
if (test ||
test2 &&
test3
) {
foo();
}
[ci skip]
Instead of code duplication in LocationBar and WebSearchBar, create
the context menu from LineEdit.
Also actually create the menu, not just re-use the standardContextMenu.
Also disable animations for Oxygen style, it breaks when changing
text to completely different one (eg. loading foo.com and then bar.com)
and the url is too long to fit in line
The code to change color of host of url is completely new.
It doesn't use any paint hacks anymore. That means text in
locationbar will now be always rendered pixel perfect, as it would
with normal QLineEdit.
Cleanup in LocationCompleter. It is now using QCompleter in inline
mode to complete domain. It is still not ideal, eg. it refreshes
and show the domain completion with delay (job run in separate thread),
and sometimes it misses it completely.
WebSearchBar: Always complete when receiving suggestions. Fix issue
when suggestions were only showed after typing at least 2 characters.
In other cases, use Q_OS_UNIX for determining UNIX platform.
UNIX platfroms without X11 should benefit from this commit, including
MAC and UNIXes on Wayland.