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