mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Merge pull request #3734 from ngosang/rss_sidebar
Fix RSS panel position not saved. Closes #3732
This commit is contained in:
commit
aa5fbd461f
@ -2208,36 +2208,36 @@ void Preferences::setRssOpenFolders(const QStringList &folders)
|
|||||||
QByteArray Preferences::getRssHSplitterState() const
|
QByteArray Preferences::getRssHSplitterState() const
|
||||||
{
|
{
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
return value("rss/qt5/splitter_h").toByteArray();
|
return value("Rss/qt5/splitter_h").toByteArray();
|
||||||
#else
|
#else
|
||||||
return value("rss/splitter_h").toByteArray();
|
return value("Rss/splitter_h").toByteArray();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setRssHSplitterState(const QByteArray &state)
|
void Preferences::setRssHSplitterState(const QByteArray &state)
|
||||||
{
|
{
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
setValue("rss/qt5/splitter_h", state);
|
setValue("Rss/qt5/splitter_h", state);
|
||||||
#else
|
#else
|
||||||
setValue("rss/splitter_h", state);
|
setValue("Rss/splitter_h", state);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray Preferences::getRssVSplitterState() const
|
QByteArray Preferences::getRssVSplitterState() const
|
||||||
{
|
{
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
return value("rss/qt5/splitter_v").toByteArray();
|
return value("Rss/qt5/splitter_v").toByteArray();
|
||||||
#else
|
#else
|
||||||
return value("rss/splitter_v").toByteArray();
|
return value("Rss/splitter_v").toByteArray();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setRssVSplitterState(const QByteArray &state)
|
void Preferences::setRssVSplitterState(const QByteArray &state)
|
||||||
{
|
{
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
setValue("rss/qt5/splitter_v", state);
|
setValue("Rss/qt5/splitter_v", state);
|
||||||
#else
|
#else
|
||||||
setValue("rss/splitter_v", state);
|
setValue("Rss/splitter_v", state);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,11 +635,11 @@ void RSSImp::saveSlidersPosition()
|
|||||||
void RSSImp::restoreSlidersPosition()
|
void RSSImp::restoreSlidersPosition()
|
||||||
{
|
{
|
||||||
const Preferences* const pref = Preferences::instance();
|
const Preferences* const pref = Preferences::instance();
|
||||||
QByteArray pos_h = pref->getRssHSplitterState();
|
const QByteArray pos_h = pref->getRssHSplitterState();
|
||||||
if (!pos_h.isNull())
|
if (!pos_h.isEmpty())
|
||||||
splitter_h->restoreState(pos_h);
|
splitter_h->restoreState(pos_h);
|
||||||
QByteArray pos_v = pref->getRssVSplitterState();
|
const QByteArray pos_v = pref->getRssVSplitterState();
|
||||||
if (!pos_v.isNull())
|
if (!pos_v.isEmpty())
|
||||||
splitter_v->restoreState(pos_v);
|
splitter_v->restoreState(pos_v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user