Newer compilers have C++14 mode as default and package maintainers tend
to not specifying a C++ version when building a package, this causes
compatibility issues when (for example) qbt is compiled in C++11 and
dependency lib is in C++14. See issue #9485.
What this commit does:
1. Checks if compiler supports at least C++11
2. Checks if compiler is set in at least C++11 mode
Enable backtrace stuff only if GNU C library used, because current
backtrace implementation based on <execinfo.h> , which is not a
part of standard C library, it is a GNU extension.
This will be usefull when building with custom POSIX-compilant C
library (like musl) and no <execinfo.h> available.
Note: configure script will detect presence of <execinfo.h> and
enable/disable feature depending on it.
Feature is enabled by default.
It prevents detachments:
To illustrate:
QMap<QString, QString> map;
/* code compiles and works fine but find() returns the non-const
QMap::iterator that detaches!
*/
QMap<QString, QString>::const_iterator it = map.find("girish");
but also some subtle bugs:
QHash<int, int> wrong;
if (wrong.find(1) == wrong.cend()) {
qDebug() << "Not found";
} else {
/* find() detached the container before cend() was called, so it
prints "Found"
*/
qDebug() << "Found";
}
QHash<int, int> right;
if (right.constFind(1) == right.cend()) {
qDebug() << "Not found"; // This is correct now !
} else {
qDebug() << "Found";
}
Enforced by QT_STRICT_ITERATORS definition.
Qt returns "Brazil" as country of QLocale("pt") instead of "Portugal". This conflicts with QLocale("pt_BR").
Rename the pt.ts to pt_PT and put a language mapping in tx's config for that locale.
Closes#4776.
Change project directory structure according to application structure.
Change 'nox' configuration option to something more meaningful 'nogui'.
Rename 'Icons' folder to 'icons' (similar to other folders).
Partially add 'nowebui' option support.
Remove QConf project file.
Definitions:
Selection in QTreeView consist of two things:
currentIndex -- is a (dotted) cell where user clicked last time. Note
that it is a cell
selectedIndexes -- is a set of cells (blue) of current selection.
Checkboxes in torrent content lists are belong to COL_NAME column.
Problem:
The problem is that spacebar toggled checkbox only in currentIndex
index. This has two consequences:
1. It is impossible to toggle checkboxes on multiple rows
simultaneously.
2. If currentIndex is not in COL_NAME column a space key doesn't work
at all. This problem is amplifyed by the fact that SelectionBehavior
is set to SelectRows. So visually it is impossible to tell which
column does it belong to. For end user it looks like "space doesn't
work sometimes".
This patch addresses the problem by implementing TorrentContentTreeView
derived from QTreeView and overridding keyPressEvent(QKeyEvent*).
The code of TorrentContentTreeView::keyPressEvent is written under
inspiration from QAbstractItemView::keyPressEvent and
QItemDelegate::editorEvent.