Skip to content

KUbuntu 14.04 support restored #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 20, 2018

Conversation

GortiZ6
Copy link
Contributor

@GortiZ6 GortiZ6 commented Jan 16, 2018

I don't know if this might be of any interest, but I needed to compile sqlitebrowser for KUbuntu 14.04 so I fixed the support for it.
It's not 100% the same behavior since some Qt functions are missed (mostly the location for the application data has been moved from QStandardPaths::AppDataLocation to QStandardPaths::GenericDataLocation due to the first been not present in Qt 5.2.1).

The rest is mostly back-porting small Qt functions into the code and explicitly enabling C++11 support.

@justinclift
Copy link
Member

Haven't looked through the entire code (others on the team would need to review this), but something jumped out at me.

In src/EditTableDialog.cpp there's this:

#if QT_VERSION > QT_VERSION_CHECK ( 5, 4, 0 )

But in src/ExtendedTableWidget.cpp there's this:

#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)

Whereas in various other files the equality check includes 5.4.0. eg '>=or<=`. Should those ones be the same?

Also, there's some inconsistency with the spacing. eg in the first example above it's ( 5, 4, 0 ), whereas the second is (5, 4, 0). Just for neatness that kind of thing should probably be consistent. 😄

@@ -82,8 +84,8 @@ void MainWindow::init()
tabifyDockWidget(ui->dockLog, ui->dockSchema);
tabifyDockWidget(ui->dockLog, ui->dockRemote);

#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) //Needed only on macOS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have dropped the check for OSX? eg it looks like this will be used for all OS's >= Qt 5.4.0.

Am I reading that wrong?

[CHG] Reverted macOS check on Mainwindow for OpenGL context creation
@GortiZ6
Copy link
Contributor Author

GortiZ6 commented Jan 17, 2018

Yep, you're right. Thanks 😄

@justinclift
Copy link
Member

The Travis CI run for this failed, but looking at the log it seems like a failure with the Travis CI infrastructure itself rather than anything with the latest commit. eg Ignore it. 😄

@GortiZ6
Copy link
Contributor Author

GortiZ6 commented Jan 17, 2018

@justinclift it seems they are facing some issue with the servers and RabbitMQ. The last commit build has been canceled. I think they are restoring everything so all the pending jobs have been canceled.

}
contains(QT_VERSION, ^5\\..*\\..*) {
QMAKE_CXXFLAGS += -std=c++11
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be simplified to just the following because we don't support Qt 4.x anyway.

QMAKE_CXXFLAGS += -std=c++11

QMAKE_CXXFLAGS += -std=c++0x
}
contains(QT_VERSION, ^5\\..*\\..*) {
QMAKE_CXXFLAGS += -std=c++11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above here.

@MKleusberg
Copy link
Member

Sorry for the delay, @GortiZ6! I have pointed out two additional minor things. If those are fixed we can merge this. Thank you very much, @GortiZ6 😄

@MKleusberg MKleusberg merged commit e7752d7 into sqlitebrowser:master May 20, 2018
@MKleusberg
Copy link
Member

As these were only minor things I'm going to merge this anyway and tweak it afterwards 😉

@GortiZ6 Feel free to open new pull requests if we ever introduce code which breaks KUbuntu 14.04 support again 😃

@GortiZ6
Copy link
Contributor Author

GortiZ6 commented May 21, 2018

Hi @MKleusberg, sorry for the late answer. I fixed the two *.pro files and I had to add a check on Qt 5.4.0 for the bug report function so I don't know if you want it or not (KUbuntu 14.04 comes with Qt 5.2.1 which don't have the QSysInfo you're using there)

@MKleusberg
Copy link
Member

No worries, @GortiZ6 😄 I have fixed the two .pro files in the meantime, so no need to fix that again. But the Qt 5.4.0 check for the bug report function would be very welcomed! That definitely makes sense. Because it's not a major feature we could just not include any system information when using Qt <5.4. If you have the time, feel free to open a new PR for that 😄 And thanks again for this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants