mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Compare commits
4 Commits
bc4bffdfe7
...
436cf0d14c
Author | SHA1 | Date | |
---|---|---|---|
436cf0d14c | |||
0e83bd89d1 | |||
536d12469a | |||
c9f44506e7 |
4
.github/workflows/osx.yml
vendored
4
.github/workflows/osx.yml
vendored
@ -39,8 +39,8 @@ jobs:
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: '6.5.1'
|
||||
modules: qtpositioning qt5compat qtserialport
|
||||
version: '6.6.1'
|
||||
modules: qtpositioning qtserialport
|
||||
- name: Create localization
|
||||
run: lrelease gpxsee.pro
|
||||
- name: Configure build
|
||||
|
@ -95,10 +95,17 @@ Var StartMenuFolder
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Function .onInit
|
||||
!ifdef QT6
|
||||
${IfNot} ${AtLeastWin10}
|
||||
MessageBox MB_OK "GPXSee can only be installed on Windows 10 or later."
|
||||
Abort
|
||||
${EndIf}
|
||||
!else
|
||||
${IfNot} ${AtLeastWin7}
|
||||
MessageBox MB_OK "GPXSee can only be installed on Windows 7 or later."
|
||||
Abort
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
|
@ -1028,13 +1028,16 @@ void GUI::openDir()
|
||||
|
||||
bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
|
||||
{
|
||||
if (_files.contains(fileName))
|
||||
QFileInfo fi(fileName);
|
||||
QString canonicalFileName(fi.canonicalFilePath());
|
||||
|
||||
if (_files.contains(canonicalFileName))
|
||||
return true;
|
||||
|
||||
if (!loadFile(fileName, tryUnknown, showError))
|
||||
return false;
|
||||
|
||||
_files.append(fileName);
|
||||
_files.append(canonicalFileName);
|
||||
#ifndef Q_OS_ANDROID
|
||||
_browser->setCurrent(fileName);
|
||||
#endif // Q_OS_ANDROID
|
||||
@ -1047,7 +1050,7 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
|
||||
updateStatusBarInfo();
|
||||
updateWindowTitle();
|
||||
#ifndef Q_OS_ANDROID
|
||||
updateRecentFiles(fileName);
|
||||
updateRecentFiles(canonicalFileName);
|
||||
#endif // Q_OS_ANDROID
|
||||
|
||||
return true;
|
||||
@ -2026,13 +2029,11 @@ void GUI::updateWindowTitle()
|
||||
#ifndef Q_OS_ANDROID
|
||||
void GUI::updateRecentFiles(const QString &fileName)
|
||||
{
|
||||
QFileInfo fi(fileName);
|
||||
QString canonicalFileName(fi.canonicalFilePath());
|
||||
QAction *a = 0;
|
||||
|
||||
QList<QAction *> actions(_recentFilesActionGroup->actions());
|
||||
for (int i = 0; i < actions.size(); i++) {
|
||||
if (actions.at(i)->text() == canonicalFileName) {
|
||||
if (actions.at(i)->text() == fileName) {
|
||||
a = actions.at(i);
|
||||
break;
|
||||
}
|
||||
@ -2046,7 +2047,7 @@ void GUI::updateRecentFiles(const QString &fileName)
|
||||
actions = _recentFilesActionGroup->actions();
|
||||
QAction *before = actions.size() ? actions.last() : _recentFilesEnd;
|
||||
_recentFilesMenu->insertAction(before,
|
||||
new QAction(canonicalFileName, _recentFilesActionGroup));
|
||||
new QAction(fileName, _recentFilesActionGroup));
|
||||
_recentFilesMenu->setEnabled(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user