mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 00:50:42 +08:00
Updates to build on Ubuntu 18.04 LTS (…)
- replace `add_compile_definitions` (added in CMake ≥3.12) with
`add_definitions` in `CMakeLists.txt`
* hat tip to: https://stackoverflow.com/a/61250302/785213
- add #ifdef's to support Qt 5.9.5 for Ubuntu 18.04 by replacing QString
`.front()` and `.back()` methods with `.at(0)` and `.at(s.size() - 1)`
* hat tip to: https://github.com/pawelsalawa/sqlitestudio/commit/90ca398
- add #ifdef's to replace `QFontMetrics` `.horizontalAdvance()` method
with `.width()` to support Qt 5.9.5 on Ubuntu 18.04
* hat tip to: https://github.com/Sigil-Ebook/Sigil/commit/a32f890
- closes #107
This commit is contained in:
@@ -15,15 +15,27 @@ void SeerSeerLogWidget::processText (const QString& text) {
|
||||
// Only log '^', '*', and '=' records.
|
||||
bool selected = false;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (selected == false && text.front() == '^') {
|
||||
#else
|
||||
if (selected == false && text.at(0) == '^') {
|
||||
#endif
|
||||
selected = true;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (selected == false && text.front() == '*') {
|
||||
#else
|
||||
if (selected == false && text.at(0) == '*') {
|
||||
#endif
|
||||
selected = true;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (selected == false && text.front() == '=') {
|
||||
#else
|
||||
if (selected == false && text.at(0) == '=') {
|
||||
#endif
|
||||
selected = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user