-
Notifications
You must be signed in to change notification settings - Fork 669
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
Hostname validation and sync start if proxy settings changes #6140
Conversation
@wiggiBe This looks good!
|
Sorry, I didn't. I will sign it right away. Oh, I see. I thought it would trigger a almost instant sync in all folders which are scheduled. |
@wiggiBe In the use case of "The account is disconnected and the user enters the proxy information" it would do it - the account will connect and all folders will be scheduled. You also want to schedule all folders in cases where the account was already connected? (say, switching between two working proxys) In that case you'd need to set the AccountState to Disconnected first. Then checkConnectivity would attempt using the new proxy and, if successful, set the state to Connected again and schedule all folders. |
That wasn't my intention but it makes sense to disconnect first and connect the account again. |
src/gui/folderman.h
Outdated
@@ -277,9 +280,6 @@ private slots: | |||
/* unloads a folder object, does not delete it */ | |||
void unloadFolder(Folder *); | |||
|
|||
/** Will start a sync after a bit of delay. */ | |||
void startScheduledSyncSoon(); |
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.
Why did you move this? :-)
Use git show
before pushing to see the commit if it makes sense.
You can use git commit --amend
to change your existing commit.
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.
It was private and needed to be public. Should be undone when the Account reconnection is used instead.
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.
@ckamm Meh, github didn't display the context properly. I thought he changed it from "private slots" to not being a slot.
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.
@ckamm Do I have to do a connectivity check for every saved account? (So I have to get a list of all accounts from accountmanager) |
@wiggiBe Yes, I'd iterate through the accounts, disconnect them (there's no function for that yet, you need to add one) and trigger the connectivity check. |
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.
You can do
git rebase -i origin/master
to squash the commit.
After doing that, please do
git-clang-format origin/master
to fix the coding style.
src/gui/networksettings.cpp
Outdated
} | ||
else | ||
{ | ||
_ui->hostLineEdit->setStyleSheet("border: 1px solid black"); // or blue |
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.
did you mean "border: native" ?
or just _ui->hostLineEdit->setStyleSheet(QString())
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.
Yes, thank you. "border: native" is very good.
The change does not build: Jenkins error:
|
src/gui/networksettings.cpp
Outdated
FolderMan::instance()->startScheduledSyncSoon(); | ||
QList<AccountStatePtr> accountList = AccountManager::instance()->accounts(); | ||
|
||
for(int i=0; i < accountList->count(); i++) |
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.
for (auto account : accountList) {
@wiggiBe are you still working on this? |
Where 'validation' currently just means "check whether it's empty". Code adapted from wiggiBe's original PR #6140
I've reworked and merged it to master! |
(good first issue)
Issue:
[Proxy Settings] Validate for empty hostname when manual proxy is selected [Proxy Settings] Validate for empty hostname when manual proxy is selected #5885
Issue:
Proxy change in Settings dialog should trigger sync Proxy change in Settings dialog should trigger sync #3233