try to fix #778
This commit is contained in:
parent
cc142367de
commit
6e8841eacf
@ -266,7 +266,7 @@ void MessagesModel::setupHeaderData() {
|
||||
<< tr("Url of the article.") << tr("Author of the article.") << tr("Creation date of the article.")
|
||||
<< tr("Contents of the article.") << tr("List of attachments.") << tr("Score of the article.")
|
||||
<< tr("Account ID of the article.") << tr("Custom ID of the article.")
|
||||
<< tr("Custom hash of the article.") << tr("Custom ID of feed of the article.")
|
||||
<< tr("Custom hash of the article.") << tr("Name of feed of the article.")
|
||||
<< tr("Indication of enclosures presence within the article.");
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,8 @@ QByteArray MessagesView::saveHeaderState() const {
|
||||
QByteArray arr;
|
||||
QDataStream outt(&arr, QIODevice::OpenModeFlag::WriteOnly);
|
||||
|
||||
// auto xx = header()->count();
|
||||
|
||||
outt.setVersion(QDataStream::Version::Qt_4_7);
|
||||
outt << header()->count();
|
||||
outt << int(header()->sortIndicatorOrder());
|
||||
@ -67,6 +69,11 @@ QByteArray MessagesView::saveHeaderState() const {
|
||||
|
||||
// Save column data.
|
||||
for (int i = 0; i < header()->count(); i++) {
|
||||
// auto aaa = header()->isSectionHidden(i);
|
||||
// auto ax = m_sourceModel->headerData(i, Qt::Orientation::Horizontal, Qt::ItemDataRole::DisplayRole).toString();
|
||||
// auto b = header()->visualIndex(i);
|
||||
// auto c = header()->sectionSize(i);
|
||||
|
||||
outt << header()->visualIndex(i);
|
||||
outt << header()->sectionSize(i);
|
||||
outt << header()->isSectionHidden(i);
|
||||
@ -102,6 +109,8 @@ void MessagesView::restoreHeaderState(const QByteArray& dta) {
|
||||
inn >> ss;
|
||||
inn >> ish;
|
||||
|
||||
// auto ax = m_sourceModel->headerData(i, Qt::Orientation::Horizontal, Qt::ItemDataRole::DisplayRole).toString();
|
||||
|
||||
if (vi < header()->count()) {
|
||||
header()->swapSections(header()->visualIndex(i), vi);
|
||||
}
|
||||
@ -274,6 +283,8 @@ void MessagesView::setupAppearance() {
|
||||
header()->setFirstSectionMovable(true);
|
||||
header()->setCascadingSectionResizes(false);
|
||||
header()->setStretchLastSection(false);
|
||||
|
||||
adjustColumns();
|
||||
}
|
||||
|
||||
void MessagesView::focusInEvent(QFocusEvent* event) {
|
||||
|
@ -706,6 +706,8 @@ void Application::onAboutToQuit() {
|
||||
mainForm()->saveSize();
|
||||
}
|
||||
|
||||
settings()->sync();
|
||||
|
||||
// Now, we can check if application should just quit or restart itself.
|
||||
if (m_shouldRestart) {
|
||||
finish();
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <QMetaObject>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QStyleFactory>
|
||||
#include <QTextDocument>
|
||||
#include <QToolTip>
|
||||
|
||||
SkinFactory::SkinFactory(QObject* parent) : QObject(parent), m_styleIsFrozen(false) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user