Skip to content
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

Move geometry/server version from nextcloud.cfg #5367

Conversation

tokun-mobica
Copy link

@szaimen szaimen marked this pull request as ready for review January 25, 2023 13:54
@szaimen szaimen marked this pull request as draft January 25, 2023 13:54
@szaimen szaimen requested a review from claucambra January 25, 2023 13:55
@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Merging #5367 (ab960a9) into master (fbb0a33) will decrease coverage by 0.34%.
The diff coverage is 6.25%.

❗ Current head ab960a9 differs from pull request most recent head 0d2b9d2. Consider uploading reports for the commit 0d2b9d2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5367      +/-   ##
==========================================
- Coverage   58.30%   57.96%   -0.34%     
==========================================
  Files         141      139       -2     
  Lines       17990    17740     -250     
==========================================
- Hits        10489    10283     -206     
+ Misses       7501     7457      -44     
Impacted Files Coverage Δ
src/libsync/configfile.cpp 26.36% <6.25%> (-0.91%) ⬇️
src/common/utility.cpp 68.12% <0.00%> (-3.35%) ⬇️
src/common/syncjournaldb.cpp 77.98% <0.00%> (-0.81%) ⬇️
src/libsync/propagatedownload.cpp 65.75% <0.00%> (-0.77%) ⬇️
src/libsync/theme.cpp 16.88% <0.00%> (-0.33%) ⬇️
src/libsync/syncengine.cpp 81.17% <0.00%> (-0.25%) ⬇️
src/libsync/owncloudpropagator.cpp 86.40% <0.00%> (-0.23%) ⬇️
src/libsync/propagatorjobs.cpp 77.96% <0.00%> (-0.18%) ⬇️
src/libsync/networkjobs.cpp 51.22% <0.00%> (-0.15%) ⬇️
... and 16 more

Comment on lines 47 to +48
[[nodiscard]] QString configFile() const;
[[nodiscard]] QString localConfigFile() const;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is impossible to understand what the difference between configFile and localConfigFile is from their names, and without really digging into the code. localConfigFile should have a name that is more indicative of the data it will hold

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. I hope for suggestions about more adequate name

src/libsync/configfile.cpp Outdated Show resolved Hide resolved
if(!QDir(settingspath).exists()) {
QDir().mkdir(settingspath);
}
QString filename = settingspath + QLatin1String("/") + QLatin1String("settings.cfg");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to the localConfigFile not being expressive of what this file is for, settings.cfg has the same issue

@claucambra
Copy link
Collaborator

I think a good question to ask is do we even need to store the geometry information? This is only used to position the settings dialog and I don't imagine this is really necessary. @mgallien thoughts?

@tokun-mobica tokun-mobica force-pushed the feature/Move-geometry-and-serverVersion-from-nextcloud.cfg branch from ab960a9 to c8681ba Compare January 25, 2023 15:58
@mgallien
Copy link
Collaborator

mgallien commented Jan 26, 2023

I think a good question to ask is do we even need to store the geometry information? This is only used to position the settings dialog and I don't imagine this is really necessary. @mgallien thoughts?

I would imagine that some might consider this feature as a given especially because I think Qt dialogs and most windows in KDE Community software do store that info between application/dialog runs.

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5367-0d2b9d26cb045a3f9b839acee1a6c5ce8a32eca2-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@@ -363,6 +363,17 @@ QString ConfigFile::configPath() const
return dir;
}

QString ConfigFile::localConfigFile() const
{
const QString settingspath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppDataLocation is the wrong path here.
Use QStandardPaths::ConfigLocation.

Read the Qt docs for more:
https://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum

@Thaodan
Copy link
Contributor

Thaodan commented Oct 5, 2023

I think the lingo in this PR is wrong. Geometry and server version are part of the application state and not the application config.

The application state should go to QStandardPaths::CacheLocation.

@Rello
Copy link
Contributor

Rello commented Dec 20, 2024

Hello,

Thank you for your contribution to the Desktop Client with this pull request.
We are closing this request as it is outdated, no longer relevant (e.g., due to Qt 6), or does not align with the current roadmap.

We truly value your support and hope to see more contributions from you in the future!

Best regards,
Nextcloud Desktop Team

@Rello Rello closed this Dec 20, 2024
@Rello Rello removed the stale label Dec 20, 2024
@Thaodan
Copy link
Contributor

Thaodan commented Dec 21, 2024

The reference issue isn't fixed (only halfway) so it's still relevant.
If the PR is stale/requires someone else to pick it up it would be better to label is accordingly IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants