"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ui/repo-tree-view.cpp" between
seafile-client-9.0.2.tar.gz and seafile-client-9.0.2-1.tar.gz

About:

repo-tree-view.cpp  (seafile-client-9.0.2):repo-tree-view.cpp  (seafile-client-9.0.2-1)
skipping to change at line 139 skipping to change at line 139
Account account = seafApplet->accountManager()->currentAccount(); Account account = seafApplet->accountManager()->currentAccount();
if (!account.isValid()) { if (!account.isValid()) {
return; return;
} }
expanded_categroies_.clear(); expanded_categroies_.clear();
QSettings settings; QSettings settings;
settings.beginGroup(kRepoTreeViewSettingsGroup); settings.beginGroup(kRepoTreeViewSettingsGroup);
QString key = QString(kRepoTreeViewSettingsExpandedCategories) + "-" + accou nt.getSignature(); QString key = QString(kRepoTreeViewSettingsExpandedCategories) + "-" + accou nt.getSignature();
if (settings.contains(key)) { if (settings.contains(key)) {
QString cats = settings.value(key, "").toString(); QString cats = settings.value(key, "").toString();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
QStringList cats_list = cats.split("\t", Qt::SkipEmptyParts); QStringList cats_list = cats.split("\t", Qt::SkipEmptyParts);
expanded_categroies_ = QSet<QString>(cats_list.begin(), cats_list.end()) ; expanded_categroies_ = QSet<QString>(cats_list.begin(), cats_list.end()) ;
#else
expanded_categroies_ = QSet<QString>::fromList(cats.split("\t", QString:
:SkipEmptyParts));
#endif
} else { } else {
// Expand "recent updated" on first use // Expand "recent updated" on first use
expanded_categroies_.insert(tr("Recently Updated")); expanded_categroies_.insert(tr("Recently Updated"));
} }
settings.endGroup(); settings.endGroup();
} }
void RepoTreeView::contextMenuEvent(QContextMenuEvent *event) void RepoTreeView::contextMenuEvent(QContextMenuEvent *event)
{ {
QPoint pos = event->pos(); QPoint pos = event->pos();
skipping to change at line 772 skipping to change at line 768
show_detail_action_->setEnabled(false); show_detail_action_->setEnabled(false);
} }
void RepoTreeView::saveExpandedCategries() void RepoTreeView::saveExpandedCategries()
{ {
Account account = seafApplet->accountManager()->currentAccount(); Account account = seafApplet->accountManager()->currentAccount();
if (!account.isValid()) { if (!account.isValid()) {
return; return;
} }
QSettings settings; QSettings settings;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
QStringList cats = expanded_categroies_.values(); QStringList cats = expanded_categroies_.values();
#else
QStringList cats = expanded_categroies_.toList();
#endif
settings.beginGroup(kRepoTreeViewSettingsGroup); settings.beginGroup(kRepoTreeViewSettingsGroup);
QString key = QString(kRepoTreeViewSettingsExpandedCategories) + "-" + accou nt.getSignature(); QString key = QString(kRepoTreeViewSettingsExpandedCategories) + "-" + accou nt.getSignature();
settings.setValue(key, cats.join("\t")); settings.setValue(key, cats.join("\t"));
settings.endGroup(); settings.endGroup();
} }
void RepoTreeView::showEvent(QShowEvent *event) void RepoTreeView::showEvent(QShowEvent *event)
{ {
updateRepoActions(); updateRepoActions();
} }
 End of changes. 4 change blocks. 
9 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)