WSL/SLF GitLab Repository

Commit 544d1f07 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixing more warnings

parent 01a54280
......@@ -672,7 +672,7 @@ QWidgetList MainWindow::findPanel(QWidget *parent, const Section &section, const
panels = findSimplePanel(parent, section, keyval);
//if still not found, check if one of our Selectors can create it:
const int panel_count = parent->findChildren<Atomic *>().count();
const qsizetype panel_count = parent->findChildren<Atomic *>().count();
if (panels.isEmpty())
panels = prepareSelector(parent, section, keyval);
//TODO: For the current MeteoIO XML the order is important here so that a TIME filter
......
......@@ -211,7 +211,7 @@ void SectionTab::setSectionDynamic(const QString &section, const QDomNode &node)
*/
bool SectionTab::isDynamicParent(const QString &section) const
{
const int dyn_idx = dynamic_sections_.indexOf(QRegularExpression(section, QRegularExpression::CaseInsensitiveOption));
const int dyn_idx = static_cast<int>( dynamic_sections_.indexOf(QRegularExpression(section, QRegularExpression::CaseInsensitiveOption)) );
return (dyn_idx != -1);
}
......@@ -288,7 +288,7 @@ QString SectionTab::getParentOf(const QString &section)
void SectionTab::spawnDynamicSection(const QString &section, const QString &new_tab_name)
{
int index = getIndex(section, Qt::CaseInsensitive);
const int dyn_idx = dynamic_sections_.indexOf(QRegularExpression(section, QRegularExpression::CaseInsensitiveOption));
const int dyn_idx = static_cast<int>( dynamic_sections_.indexOf(QRegularExpression(section, QRegularExpression::CaseInsensitiveOption)) );
bool found = false;
for (int ii = index + 1; ii < this->count(); ++ii) {
......@@ -362,7 +362,7 @@ void SectionTab::removeDynamicSection(const QString &section)
const QString parent_section( getParentOf(section) );
if (countChildren(parent_section) == 1) {
const int dyn_idx = dynamic_sections_.indexOf(parent_section, Qt::CaseInsensitive);
const int dyn_idx = static_cast<int>( dynamic_sections_.indexOf(parent_section, Qt::CaseInsensitive) );
dynamic_running_indices_[dyn_idx] = 1;
}
for (int ii = 0; ii < this->tabBar()->count(); ++ii) {
......
......@@ -43,6 +43,10 @@ QString color(const QString &text, const QString &color);
} //namespace html
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
#define qsizetype int
#endif
/**
* @struct CaseInsensitiveCompare
* @brief A weak ordered comparison struct for case insensitive key-value mapping.
......
......@@ -279,7 +279,9 @@ int main(int argc, char *argv[])
QElapsedTimer startup_timer;
startup_timer.start();
#endif //def DEBUG_TIMERS
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QStringList errors; //errors that happen before a logger is available
QApplication app(argc, argv);
setAppMetadata();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment