This commit squashes all the changes in the Qt5 branch
relative to master.
Backward compatibility with Qt4 is retained.
Original authors:
- Philip Kaufmann <phil.kaufmann@t-online.de>
- Jonas Schnelli <jonas.schnelli@include7.ch>
- as QClipboard::Selection isn't available on Windows ensure that the
correct mode is called, but sill allow selection for e.g. X11
- start conversion from QCoreApplication::instance() to qApp in
guiutil.cpp (I intend to harmonize this all over the source with my Qt5
compatibility pull)
- try to enforce the same style to all Qt related files
- remove unneeded includes from the files
- add missing Q_OBJECT, QT_BEGIN_NAMESPACE / QT_END_NAMESPACE
- prepares for a pull-req to include Qt5 compatibility
This allows fun stuff such as `bitcoin --help | less`, and more
easy piping to files.
Looking at other tools such as bash, gcc, they all send their help
text to stdout.
On Linux/Mac the command-line options were printed to stderr when the button
was pressed in the debug window, resulting in confusion. This is fixed
in this commit by adding a separate method.
The option to open the debug logfile from the debug window was implemented only for
windows. By using `QDesktopServices::openUrl` it now works on any platform.
Implemented without having to touch any translation: by listening for QEvent::ToolTipChange events, then rewriting the tooltips to prefix `<qt/>` if it is not yet rich text.
- converted openBictoinAction to toggleHideAction
- put GUIUtil functions into a namespace instead of a class
- put window-related functions together in optionsdialog
Reasoning:
- toggle is more typical behaviour
- it's more functional
- better UX
The typical issue with toggling visibility is that when a window
is obscured by other windows but in the 'shown' state, hiding it
isn't what you want. I've added an 'isObscured' function to GUIUtil
that checks several pixels in the window to see if they are visible
on the desktop so that an obscured but shown window can be raised.
Conflicts:
src/qt/guiutil.cpp
src/qt/guiutil.h