KUbuntu 14.04 support restored (#1298)

* - [NEW] Add new interface and functionality to manage database file extension. (Implements feature request #659)

* - [FIX] Fixed CMake file to src.pro

* - Applied changes requested by mgrojo to uniform code with sqlitebrowser standards
- Add "history" when closing editor window, but reopen before closing preferences
- Revert some changes done by QtCreator

* Refuse from previous commit

* Additional changes requested by MKleusberg:
- [CHG] Always add "All files (*)" to filters
- [FIX] Removed unused include

* merged from master

* Merge sqlitebrowser master

* [FIX] Fixed compatibility to compile on KUbuntu 14.04 with Qt 5.2.1

* [FIX] Fix Qt version for QOpenGLWidget support on previous commit

* [CHG] Uniformed QT_VERSION_CHECK style
[CHG] Reverted macOS check on Mainwindow for OpenGL context creation
This commit is contained in:
GortiZ
2018-05-20 15:56:01 +02:00
committed by Martin Kleusberg
parent b69e7cd034
commit e7752d7398
9 changed files with 85 additions and 7 deletions

View File

@@ -254,7 +254,13 @@ void PreferencesDialog::saveSettings()
// This is a new certificate. Copy file to a safe place.
// Generate unique destination file name
QString copy_to = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation).append("/").append(QFileInfo(path).fileName());
QString copy_to = QStandardPaths::writableLocation(
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QStandardPaths::AppDataLocation
#else
QStandardPaths::GenericDataLocation
#endif
).append("/").append(QFileInfo(path).fileName());
int suffix = 0;
do
{
@@ -263,7 +269,13 @@ void PreferencesDialog::saveSettings()
// Copy file
copy_to.append(QString::number(suffix));
QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
QDir().mkpath(QStandardPaths::writableLocation(
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QStandardPaths::AppDataLocation
#else
QStandardPaths::GenericDataLocation
#endif
));
QFile::copy(path, copy_to);
new_client_certs.push_back(copy_to);