Skip to main content
ALT Linux Bugzilla
– Attachment 21993 Details for
Bug 60108
~/.config/QtProject.conf бесконечно разрастается
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Исправляющий патч из upstream
qt6-base-QTBUG-133804-fully-encode-file-dialog-urls.patch (text/plain), 2.09 KB, created by
Жора Змейкин
on 2026-08-06 12:10:18 MSK
(
hide
)
Description:
Исправляющий патч из upstream
Filename:
MIME Type:
Creator:
Жора Змейкин
Created:
2026-08-06 12:10:18 MSK
Size:
2.09 KB
patch
obsolete
>Subject: [PATCH] QFileDialog: Fully encode persisted URLs > >Qt 5 and Qt 6 use incompatible QSettings INI encodings while sharing >QtProject.conf. Alternating file dialogs from both versions repeatedly >re-encodes non-ASCII URLs and can grow the file without bound. > >Store the QFileDialog URL fields in their fully encoded ASCII form. Both >Qt versions decode this representation, so the settings remain compatible >without changing QSettings globally. > >Fixes: QTBUG-133804 >Upstream: https://codereview.qt-project.org/c/qt/qtbase/+/757860 >Change-Id: I6a2ef261a76850fea6eb15f1b6ddbc0e3fa014b6 >Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> > >diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp >index 1cff0448d..bea2d54e4 100644 >--- a/src/widgets/dialogs/qfiledialog.cpp >+++ b/src/widgets/dialogs/qfiledialog.cpp >@@ -2822,16 +2822,17 @@ void QFileDialogPrivate::saveSettings() > > if (usingWidgets()) { > settings.setValue("sidebarWidth", qFileDialogUi->splitter->sizes().constFirst()); >- settings.setValue("shortcuts", QUrl::toStringList(qFileDialogUi->sidebar->urls())); >+ settings.setValue("shortcuts", >+ QUrl::toStringList(qFileDialogUi->sidebar->urls(), QUrl::FullyEncoded)); > settings.setValue("treeViewHeader", qFileDialogUi->treeView->header()->saveState()); > } > QStringList historyUrls; > const QStringList history = q->history(); > historyUrls.reserve(history.size()); > for (const QString &path : history) >- historyUrls << QUrl::fromLocalFile(path).toString(); >+ historyUrls << QUrl::fromLocalFile(path).toString(QUrl::FullyEncoded); > settings.setValue("history", historyUrls); >- settings.setValue("lastVisited", lastVisitedDir()->toString()); >+ settings.setValue("lastVisited", lastVisitedDir()->toString(QUrl::FullyEncoded)); > const QMetaEnum &viewModeMeta = q->metaObject()->enumerator(q->metaObject()->indexOfEnumerator("ViewMode")); > settings.setValue("viewMode", QLatin1StringView(viewModeMeta.key(q->viewMode()))); > settings.setValue("qtVersion", QT_VERSION_STR ""_L1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60108
: 21993