mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-22 02:20:47 +01:00
Compare commits
No commits in common. "468e662e4fa0d6b99b6978c1a962e6a05513e0ac" and "20f1003ce6798f6a39b65956433714de892fe2bc" have entirely different histories.
468e662e4f
...
20f1003ce6
@ -2079,7 +2079,7 @@ void GUI::updateRecentFiles(const QString &fileName)
|
|||||||
|
|
||||||
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)->data().toString() == fileName) {
|
if (actions.at(i)->text() == fileName) {
|
||||||
a = actions.at(i);
|
a = actions.at(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2092,9 +2092,8 @@ 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;
|
||||||
a = new QAction(fileName, _recentFilesActionGroup);
|
_recentFilesMenu->insertAction(before,
|
||||||
a->setData(fileName);
|
new QAction(fileName, _recentFilesActionGroup));
|
||||||
_recentFilesMenu->insertAction(before, a);
|
|
||||||
_recentFilesMenu->setEnabled(true);
|
_recentFilesMenu->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2111,7 +2110,7 @@ void GUI::clearRecentFiles()
|
|||||||
void GUI::recentFileSelected(QAction *action)
|
void GUI::recentFileSelected(QAction *action)
|
||||||
{
|
{
|
||||||
int showError = 1;
|
int showError = 1;
|
||||||
openFile(action->data().toString(), true, showError);
|
openFile(action->text(), true, showError);
|
||||||
}
|
}
|
||||||
#endif // Q_OS_ANDROID
|
#endif // Q_OS_ANDROID
|
||||||
|
|
||||||
@ -2489,7 +2488,7 @@ void GUI::writeSettings()
|
|||||||
QList<QAction*> recentActions(_recentFilesActionGroup->actions());
|
QList<QAction*> recentActions(_recentFilesActionGroup->actions());
|
||||||
QStringList recent;
|
QStringList recent;
|
||||||
for (int i = 0; i < recentActions.size(); i++)
|
for (int i = 0; i < recentActions.size(); i++)
|
||||||
recent.append(recentActions.at(i)->data().toString());
|
recent.append(recentActions.at(i)->text());
|
||||||
|
|
||||||
settings.beginGroup(SETTINGS_FILE);
|
settings.beginGroup(SETTINGS_FILE);
|
||||||
WRITE(recentDataFiles, recent);
|
WRITE(recentDataFiles, recent);
|
||||||
@ -3230,7 +3229,6 @@ void GUI::loadRecentFiles(const QStringList &files)
|
|||||||
|
|
||||||
for (int i = 0; i < files.size(); i++) {
|
for (int i = 0; i < files.size(); i++) {
|
||||||
QAction *a = new QAction(files.at(i), _recentFilesActionGroup);
|
QAction *a = new QAction(files.at(i), _recentFilesActionGroup);
|
||||||
a->setData(files.at(i));
|
|
||||||
_recentFilesMenu->insertAction(before, a);
|
_recentFilesMenu->insertAction(before, a);
|
||||||
before = a;
|
before = a;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user