diff libgui/src/m-editor/file-editor-tab.cc @ 24827:1e0718c1867c

eliminate most Qt version checks * acinclude.m4 (OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE, OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE, OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE, OCTAVE_CHECK_FUNC_QINSTALLMESSAGEHANDLER, OCTAVE_CHECK_FUNC_QMOUSEEVENT_LOCALPOS, OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT): New macros. (OCTAVE_CHECK_QT_VERSION): Use them. Check for QStandardPaths header. * Canvas.cc, find-files-dialog.cc, file-editor-tab.cc, octave-gui.cc, resource-manager.cc, shortcut-manager.cc, variable-editor.cc, workspace-view.cc: Use new macros instead of checking Qt version.
author John W. Eaton <jwe@octave.org>
date Fri, 02 Mar 2018 13:25:34 -0500
parents 3695c2cd69b8
children 6652d3823428
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Fri Mar 02 10:45:06 2018 -0800
+++ b/libgui/src/m-editor/file-editor-tab.cc	Fri Mar 02 13:25:34 2018 -0500
@@ -636,13 +636,13 @@
         bool update_apis = false;  // flag, whether update of apis files
 
         // get path to prepared api info
-#if defined (HAVE_QT4)
+#if defined (HAVE_QSTANDARDPATHS)
         QString prep_apis_path
-          = QDesktopServices::storageLocation (QDesktopServices::HomeLocation)
+          = QStandardPaths::writableLocation (QStandardPaths::HomeLocation)
           + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/";
 #else
         QString prep_apis_path
-          = QStandardPaths::writableLocation (QStandardPaths::HomeLocation)
+          = QDesktopServices::storageLocation (QDesktopServices::HomeLocation)
           + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/";
 #endif