mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 14:40:10 +00:00
GUI: Replace deprecated Qt calls + fix warnings
Since QTextEdit::setTabStopDistance() is available starting 5.10 and we still support Qt 5.5 (Ubuntu 16), it's moved to log_window.cpp and ifdefed according to version
This commit is contained in:
@@ -247,6 +247,7 @@ Settings::Settings() : dummy(this){
|
||||
if(!i.parent[0])
|
||||
opt.addOnChangeCallback(test_callback);
|
||||
#endif
|
||||
(void) opt; //suppress unused warning
|
||||
}
|
||||
|
||||
for(const auto &i : optionCallbacks){
|
||||
|
||||
@@ -10,7 +10,7 @@ SpinBoxUi::SpinBoxUi(QSpinBox *spinbox, Settings *settings, const std::string &o
|
||||
}
|
||||
|
||||
void SpinBoxUi::connectSignals(){
|
||||
connect(spinbox, Overload<const QString &>::of(&QSpinBox::valueChanged),
|
||||
connect(spinbox, &QSpinBox::textChanged,
|
||||
this, &SpinBoxUi::textEdited);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,9 +91,6 @@
|
||||
<family>Monospace</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="tabStopWidth">
|
||||
<number>40</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string/>
|
||||
</property>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QtGlobal>
|
||||
#include "log_window.hpp"
|
||||
|
||||
LogWindow::LogWindow(QWidget *parent): QDialog(parent){
|
||||
@@ -11,6 +12,12 @@ LogWindow::LogWindow(QWidget *parent): QDialog(parent){
|
||||
| Qt::WindowMinimizeButtonHint
|
||||
| Qt::WindowCloseButtonHint);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
|
||||
ui.terminal->setTabStopWidth(40);
|
||||
#else
|
||||
ui.terminal->setTabStopDistance(40);
|
||||
#endif
|
||||
|
||||
connect(ui.copyBtn, SIGNAL(clicked()), this, SLOT(copyToClipboard()));
|
||||
connect(ui.saveBtn, SIGNAL(clicked()), this, SLOT(saveToFile()));
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ void UltragridWindow::processFinished(int code, QProcess::ExitStatus status){
|
||||
msgBox.setText("Ultragrid has exited with an error! If you need help, please send an email "
|
||||
"to ultragrid-dev@cesnet.cz with log attached.");
|
||||
QPushButton *showLogBtn = msgBox.addButton(tr("Show log"), QMessageBox::ActionRole);
|
||||
QPushButton *dissmissBtn = msgBox.addButton(tr("Dismiss"), QMessageBox::RejectRole);
|
||||
msgBox.addButton(tr("Dismiss"), QMessageBox::RejectRole);
|
||||
msgBox.exec();
|
||||
|
||||
if(msgBox.clickedButton() == showLogBtn){
|
||||
|
||||
Reference in New Issue
Block a user