mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 18:40:16 +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])
|
if(!i.parent[0])
|
||||||
opt.addOnChangeCallback(test_callback);
|
opt.addOnChangeCallback(test_callback);
|
||||||
#endif
|
#endif
|
||||||
|
(void) opt; //suppress unused warning
|
||||||
}
|
}
|
||||||
|
|
||||||
for(const auto &i : optionCallbacks){
|
for(const auto &i : optionCallbacks){
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ SpinBoxUi::SpinBoxUi(QSpinBox *spinbox, Settings *settings, const std::string &o
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SpinBoxUi::connectSignals(){
|
void SpinBoxUi::connectSignals(){
|
||||||
connect(spinbox, Overload<const QString &>::of(&QSpinBox::valueChanged),
|
connect(spinbox, &QSpinBox::textChanged,
|
||||||
this, &SpinBoxUi::textEdited);
|
this, &SpinBoxUi::textEdited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,9 +91,6 @@
|
|||||||
<family>Monospace</family>
|
<family>Monospace</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="tabStopWidth">
|
|
||||||
<number>40</number>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
#include <QtGlobal>
|
||||||
#include "log_window.hpp"
|
#include "log_window.hpp"
|
||||||
|
|
||||||
LogWindow::LogWindow(QWidget *parent): QDialog(parent){
|
LogWindow::LogWindow(QWidget *parent): QDialog(parent){
|
||||||
@@ -11,6 +12,12 @@ LogWindow::LogWindow(QWidget *parent): QDialog(parent){
|
|||||||
| Qt::WindowMinimizeButtonHint
|
| Qt::WindowMinimizeButtonHint
|
||||||
| Qt::WindowCloseButtonHint);
|
| 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.copyBtn, SIGNAL(clicked()), this, SLOT(copyToClipboard()));
|
||||||
connect(ui.saveBtn, SIGNAL(clicked()), this, SLOT(saveToFile()));
|
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 "
|
msgBox.setText("Ultragrid has exited with an error! If you need help, please send an email "
|
||||||
"to ultragrid-dev@cesnet.cz with log attached.");
|
"to ultragrid-dev@cesnet.cz with log attached.");
|
||||||
QPushButton *showLogBtn = msgBox.addButton(tr("Show log"), QMessageBox::ActionRole);
|
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();
|
msgBox.exec();
|
||||||
|
|
||||||
if(msgBox.clickedButton() == showLogBtn){
|
if(msgBox.clickedButton() == showLogBtn){
|
||||||
|
|||||||
Reference in New Issue
Block a user