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