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

Provide compile-time option for disabling updater / update checker. #732

Closed
JoshStrobl opened this Issue Oct 3, 2017 · 16 comments

Comments

Projects
None yet
2 participants
@JoshStrobl

JoshStrobl commented Oct 3, 2017

Expected behaviour

I have the ability to disable the update checker for the Solus package. As the package maintainer, I track QOwnNotes changes separately (thus have the update dialog prompt me when there's an update, which I'm already aware of, isn't necessary) and don't want there to be the risk of the updater creating filesystem changes for end users that wouldn't necessarily be reversible like a package reversion would.

Actual behaviour

Ability to disable the updater.

Steps to reproduce

  1. Compile QOwnNotes, use it. Get prompted to update.
  2. Proceed to check CMakeLists.txt and the .pro file for option to disable updater. Find none.

Output from the debug section in the settings dialog

N/A

Relevant log output (you have to enable enable the log widget)

N/A

@pbek

This comment has been minimized.

Owner

pbek commented Oct 3, 2017

You currently have the ability to disable that dialog in the settings, what would you need?

@pbek pbek added the enhancement label Oct 3, 2017

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 3, 2017

Well, in my opinion, either:

a) A compile-time option to remove the updater + service entirely
b) The ability to set a default setting for enabling / disabling the dialog (modifying a header file would be fine even) so it'd be opt-in instead of opt-out.

@pbek

This comment has been minimized.

Owner

pbek commented Oct 3, 2017

I don't want to remove the service. But if you set the RELEASE variable in https://github.com/pbek/QOwnNotes/blob/9635934252e70f8812abfff6b905e73b7bfaf649/src/release.h
to Solus I will disable the automatic opening of the updater dialog (like I do for other releases).

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 3, 2017

Works for me! I already have it set to Solus for release.h.

Much appreciated as always 👍

@pbek

This comment has been minimized.

Owner

pbek commented Oct 3, 2017

No problem, Josh. Thank you for taking care of packaging QOwnNotes for Solus!

@pbek

This comment has been minimized.

Owner

pbek commented Oct 3, 2017

It should already work, I just took a look at

QOwnNotes/src/mainwindow.cpp

Lines 2106 to 2111 in 3506c19

if (settings.value("disableAutomaticUpdateDialog").toString().isEmpty()) {
QString release = qApp->property("release").toString();
bool enabled = release.contains("Travis") ||
release.contains("AppVeyor") || release.contains("AppImage");
settings.setValue("disableAutomaticUpdateDialog", !enabled);
}
. The dialog should not show up on new installs...

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 3, 2017

Well I have a fresh install of QOwnNotes since the implementation of that and I can reliably trigger the update via the "Force old version number to trigger update". I've also validated that the release.h is indeed #define RELEASE "Solus"

I went and checked .config/PBE/QOwnNotes and grepped for disableAutomatic and was returned:

[qownnotes] cat ~/.config/PBE/QOwnNotes.conf | grep 'disableAutomatic'
disableAutomaticUpdateDialog=false

I checked the settings and it presents:

screenshot from 2017-10-03 21-01-58

Is it the .isEmpty() check (I don't know if it'd return "false" during string conversion or not)? You're the C++ guy not me lol

@pbek

This comment has been minimized.

Owner

pbek commented Oct 3, 2017

Maybe something set the setting before it gets disabled by above code. Do you remember if you visited the settings dialog from the "welcome dialog" after you installed QOwnNotes?

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 3, 2017

Not sure but I'll go ahead and wipe out my QOwnNotes config (well move it, really) and check.

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 3, 2017

Right so, if I only specify the notes directory and skip the configuration to enable it to sync to my Nextcloud server (and the setup around that), it sets it to true. However, if I specify the notes directory, then proceed to set up my Nextcloud server, it sets it to false. (I'm doing all this via click the prompts and various instructions on the Welcome dialog.

@pbek

This comment has been minimized.

Owner

pbek commented Oct 3, 2017

Ok, thank you. Then I know what went wrong. I'll fix that.

@pbek

This comment has been minimized.

Owner

pbek commented Oct 4, 2017

17.10.1

  • the automatic update dialog will now also be disable per default for
    repositories and self-builds if the settings dialog was opened in the
    welcome dialog at first application startup

@pbek pbek added this to the 17.10.1 milestone Oct 4, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Oct 4, 2017

There now is a new release, could you please test it and report if it works for you?

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 4, 2017

Yep, compiling right now.

@JoshStrobl

This comment has been minimized.

JoshStrobl commented Oct 4, 2017

Can confirm that the issue is now resolved. Really appreciate the quick turnaround time on getting this issue resolved 👍

@JoshStrobl JoshStrobl closed this Oct 4, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Oct 4, 2017

Great, thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment