-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Reload File" feature #625
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ class QVImageCore : public QObject | |
|
||
explicit QVImageCore(QObject *parent = nullptr); | ||
|
||
void loadFile(const QString &fileName); | ||
void loadFile(const QString &fileName, bool isReloaing = false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed! |
||
ReadData readFile(const QString &fileName, const QColorSpace &targetColorSpace, bool forCache); | ||
void loadPixmap(const ReadData &readData); | ||
void closeImage(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ void ShortcutManager::initializeShortcutsList() | |
{ | ||
shortcutsList.append({tr("Open"), "open", keyBindingsToStringList(QKeySequence::Open), {}}); | ||
shortcutsList.append({tr("Open URL"), "openurl", QStringList(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_O).toString()), {}}); | ||
shortcutsList.append({tr("Reload File"), "reloadfile", keyBindingsToStringList(QKeySequence::Refresh), {}}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indeed this is cmd+r on macOS, but this conflicts with rename. I don't know which should be prioritized--maybe refresh is more important. Make sure this doesn't conflict on other platforms too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, you can take a look at my latest commit and see if you like that idea or have a different suggestion perhaps. |
||
shortcutsList.append({tr("Open Containing Folder"), "opencontainingfolder", {}, {}}); | ||
//Sets open containing folder action name to platform-appropriate alternative | ||
#ifdef Q_OS_WIN | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache key includes the file size, but this ensures it handles situations in which the size doesn't change (e.g. an uncompressed BMP was re-saved).