Fix compilation with QT 5.13
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
AxisWidget::AxisWidget( Axis* a, QWidget* parent )
|
AxisWidget::AxisWidget( Axis* a, QWidget* parent )
|
||||||
: FlashButton(QString::null, QString::null, parent) {
|
: FlashButton(QString(), QString(), parent) {
|
||||||
axis = a;
|
axis = a;
|
||||||
ae = NULL;
|
ae = NULL;
|
||||||
update();
|
update();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
ButtonWidget::ButtonWidget( Button* b, QWidget* parent )
|
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();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ FlashRadioArray::FlashRadioArray( const QStringList &names, bool horizontal, QWi
|
|||||||
mainLayout->setSpacing(5);
|
mainLayout->setSpacing(5);
|
||||||
}
|
}
|
||||||
foreach (const QString &name, names) {
|
foreach (const QString &name, names) {
|
||||||
FlashButton *button = new FlashButton( name, QString::null, this );
|
FlashButton *button = new FlashButton( name, QString(), this );
|
||||||
buttons.append(button);
|
buttons.append(button);
|
||||||
//when any of the buttons is clicked, it calls the same function on this.
|
//when any of the buttons is clicked, it calls the same function on this.
|
||||||
connect( button, SIGNAL( clicked() ), this, SLOT( clicked() ));
|
connect( button, SIGNAL( clicked() ), this, SLOT( clicked() ));
|
||||||
|
@ -102,8 +102,8 @@ void JoySlider::drawBox( int x, int width ) {
|
|||||||
//widget but is defined by x-coordinate and width
|
//widget but is defined by x-coordinate and width
|
||||||
QPainter paint( this );
|
QPainter paint( this );
|
||||||
|
|
||||||
paint.setPen( (isEnabled())?Qt::white:palette().background().color() );
|
paint.setPen( (isEnabled())?Qt::white:palette().window().color() );
|
||||||
paint.setBrush( (isEnabled())?Qt::white:palette().background() );
|
paint.setBrush( (isEnabled())?Qt::white:palette().window() );
|
||||||
paint.drawRect( x, 1, width, boxheight);
|
paint.drawRect( x, 1, width, boxheight);
|
||||||
|
|
||||||
paint.setPen( palette().dark().color() );
|
paint.setPen( palette().dark().color() );
|
||||||
|
@ -54,7 +54,7 @@ LayoutManager::LayoutManager( bool useTrayIcon, const QString &devdir, const QSt
|
|||||||
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
|
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
|
||||||
|
|
||||||
//no layout loaded at start.
|
//no layout loaded at start.
|
||||||
setLayoutName(QString::null);
|
setLayoutName(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
LayoutManager::~LayoutManager() {
|
LayoutManager::~LayoutManager() {
|
||||||
@ -289,7 +289,7 @@ void LayoutManager::clear() {
|
|||||||
joypad->toDefault();
|
joypad->toDefault();
|
||||||
}
|
}
|
||||||
//and call our layout NL
|
//and call our layout NL
|
||||||
setLayoutName(QString::null);
|
setLayoutName(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void LayoutManager::save() {
|
void LayoutManager::save() {
|
||||||
@ -328,7 +328,7 @@ void LayoutManager::saveAs() {
|
|||||||
QString name = QInputDialog::getText(le,
|
QString name = QInputDialog::getText(le,
|
||||||
tr("Name new layout - %1").arg(QJOYPAD_NAME),
|
tr("Name new layout - %1").arg(QJOYPAD_NAME),
|
||||||
tr("Enter a name for the new layout:"),
|
tr("Enter a name for the new layout:"),
|
||||||
QLineEdit::Normal, QString::null, &ok);
|
QLineEdit::Normal, QString(), &ok);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ void LayoutManager::importLayout() {
|
|||||||
if (QMessageBox::warning(le,
|
if (QMessageBox::warning(le,
|
||||||
QString("%1 - %2").arg(tr("Layout exists"), QJOYPAD_NAME),
|
QString("%1 - %2").arg(tr("Layout exists"), QJOYPAD_NAME),
|
||||||
tr("Layout %1 exists. Do you want to overwrite it?"),
|
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;
|
return;
|
||||||
}
|
}
|
||||||
QFile::remove(filename);
|
QFile::remove(filename);
|
||||||
@ -432,7 +432,7 @@ void LayoutManager::saveDefault() {
|
|||||||
void LayoutManager::remove() {
|
void LayoutManager::remove() {
|
||||||
if (currentLayout.isNull()) return;
|
if (currentLayout.isNull()) return;
|
||||||
if (QMessageBox::warning(le, tr("Delete layout? - %1").arg(QJOYPAD_NAME),
|
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;
|
return;
|
||||||
}
|
}
|
||||||
QString filename = getFileName( currentLayout );
|
QString filename = getFileName( currentLayout );
|
||||||
|
@ -158,7 +158,7 @@ void LayoutEdit::setLayout(const QString &layout) {
|
|||||||
void LayoutEdit::updateLayoutList() {
|
void LayoutEdit::updateLayoutList() {
|
||||||
//blank the list, then load in new names from the LayoutManager.
|
//blank the list, then load in new names from the LayoutManager.
|
||||||
cmbLayouts->clear();
|
cmbLayouts->clear();
|
||||||
cmbLayouts->addItem(tr("[NO LAYOUT]"), QVariant(QString::null));
|
cmbLayouts->addItem(tr("[NO LAYOUT]"), QVariant(QString()));
|
||||||
if (lm->currentLayout.isNull()) {
|
if (lm->currentLayout.isNull()) {
|
||||||
cmbLayouts->setCurrentIndex(0);
|
cmbLayouts->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user