Skip to content

Commit

Permalink
Fix compilation with QT 5.13
Browse files Browse the repository at this point in the history
  • Loading branch information
substring committed Jul 2, 2019
1 parent e3880b7 commit 99f23f8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/axisw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


AxisWidget::AxisWidget( Axis* a, QWidget* parent )
: FlashButton(QString::null, QString::null, parent) {
: FlashButton(QString(), QString(), parent) {
axis = a;
ae = NULL;
update();
Expand Down
2 changes: 1 addition & 1 deletion src/buttonw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


ButtonWidget::ButtonWidget( Button* b, QWidget* parent )
: FlashButton(QString::null, QString::null, parent), on(false), button(b) {
: FlashButton(QString(), QString(), parent), on(false), button(b) {
update();
}

Expand Down
2 changes: 1 addition & 1 deletion src/flash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FlashRadioArray::FlashRadioArray( const QStringList &names, bool horizontal, QWi
mainLayout->setSpacing(5);
}
foreach (const QString &name, names) {
FlashButton *button = new FlashButton( name, QString::null, this );
FlashButton *button = new FlashButton( name, QString(), this );
buttons.append(button);
//when any of the buttons is clicked, it calls the same function on this.
connect( button, SIGNAL( clicked() ), this, SLOT( clicked() ));
Expand Down
4 changes: 2 additions & 2 deletions src/joyslider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void JoySlider::drawBox( int x, int width ) {
//widget but is defined by x-coordinate and width
QPainter paint( this );

paint.setPen( (isEnabled())?Qt::white:palette().background().color() );
paint.setBrush( (isEnabled())?Qt::white:palette().background() );
paint.setPen( (isEnabled())?Qt::white:palette().window().color() );
paint.setBrush( (isEnabled())?Qt::white:palette().window() );
paint.drawRect( x, 1, width, boxheight);

paint.setPen( palette().dark().color() );
Expand Down
10 changes: 5 additions & 5 deletions src/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ LayoutManager::LayoutManager( bool useTrayIcon, const QString &devdir, const QSt
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));

//no layout loaded at start.
setLayoutName(QString::null);
setLayoutName(QString());
}

LayoutManager::~LayoutManager() {
Expand Down Expand Up @@ -289,7 +289,7 @@ void LayoutManager::clear() {
joypad->toDefault();
}
//and call our layout NL
setLayoutName(QString::null);
setLayoutName(QString());
}

void LayoutManager::save() {
Expand Down Expand Up @@ -328,7 +328,7 @@ void LayoutManager::saveAs() {
QString name = QInputDialog::getText(le,
tr("Name new layout - %1").arg(QJOYPAD_NAME),
tr("Enter a name for the new layout:"),
QLineEdit::Normal, QString::null, &ok);
QLineEdit::Normal, QString(), &ok);
if (!ok) {
return;
}
Expand Down Expand Up @@ -390,7 +390,7 @@ void LayoutManager::importLayout() {
if (QMessageBox::warning(le,
QString("%1 - %2").arg(tr("Layout exists"), QJOYPAD_NAME),
tr("Layout %1 exists. Do you want to overwrite it?"),
tr("Over&write"), tr("&Cancel"), QString::null, 0, 1) == 1) {
tr("Over&write"), tr("&Cancel"), QString(), 0, 1) == 1) {
return;
}
QFile::remove(filename);
Expand Down Expand Up @@ -432,7 +432,7 @@ void LayoutManager::saveDefault() {
void LayoutManager::remove() {
if (currentLayout.isNull()) return;
if (QMessageBox::warning(le, tr("Delete layout? - %1").arg(QJOYPAD_NAME),
tr("Remove layout %1 permanently from your hard drive?").arg(currentLayout), tr("&Delete"), tr("&Cancel"), QString::null, 0, 1 ) == 1) {
tr("Remove layout %1 permanently from your hard drive?").arg(currentLayout), tr("&Delete"), tr("&Cancel"), QString(), 0, 1 ) == 1) {
return;
}
QString filename = getFileName( currentLayout );
Expand Down
2 changes: 1 addition & 1 deletion src/layout_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void LayoutEdit::setLayout(const QString &layout) {
void LayoutEdit::updateLayoutList() {
//blank the list, then load in new names from the LayoutManager.
cmbLayouts->clear();
cmbLayouts->addItem(tr("[NO LAYOUT]"), QVariant(QString::null));
cmbLayouts->addItem(tr("[NO LAYOUT]"), QVariant(QString()));
if (lm->currentLayout.isNull()) {
cmbLayouts->setCurrentIndex(0);
}
Expand Down

0 comments on commit 99f23f8

Please sign in to comment.