KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
102574
:
KNode switches sorting of article list on every...
P
roduct
:
knode
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2005-03-27 01:18
Last Changed:
2005-03-28 15:30:24
Version: (using KDE KDE 3.4.0) Installed from: Compiled From Sources Compiler: gcc (GCC) 3.3.5 (Debian 1:3.3.5-12) OS: Linux On each start, the sorting of the news article list changes. I start KNode and the sorting is "Date". I quit and start again and it is "Date (Thread changed)". I quit and start again and it is back to "Date". And so on, and so on... I disabled the SortByThreadChange in headerview.cpp with the patch that you'll find below and now it works for me. But people who want to sort by thread change may want a "real" fix. --- headerview.cpp 2005-02-04 00:12:08.000000000 +0100 +++ /usr/local/src/kde/kdepim-3.4.0/knode/headerview.cpp 2005-03-27 01:08:11.000000000 +0100 @@ -209,7 +209,7 @@ if ( column == mSortCol ) { mSortAsc = ascending; if ( column == mPaintInfo.dateCol && ascending ) - mSortByThreadChangeDate = !mSortByThreadChangeDate; + mSortByThreadChangeDate = false; //!mSortByThreadChangeDate; } else { mSortCol = column; emit sortingChanged( column );
Comment
#1
Volker Krause 2005-03-28 13:52:04
CVS commit by vkrause: Don't accidently toggle 'sort by thread change date' when restoring header view layout. CCBUG: 102574 M +6 -6 headerview.cpp 1.8 M +2 -1 headerview.h 1.6 --- kdepim/knode/headerview.cpp #1.7:1.8 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -40,5 +40,6 @@ KNHeaderView::KNHeaderView(QWidget *pare mDelayedCenter( -1 ), mActiveItem( 0 ), - mShowingFolder( false ) + mShowingFolder( false ), + mInitDone( false ) { mPaintInfo.subCol = addColumn( i18n("Subject"), 310 ); @@ -99,11 +100,10 @@ KNHeaderView::~KNHeaderView() void KNHeaderView::readConfig() { - static bool initDone = false; - if ( !initDone ) { - initDone = true; + if ( !mInitDone ) { KConfig *conf = knGlobals.config(); conf->setGroup( "HeaderView" ); mSortByThreadChangeDate = conf->readBoolEntry( "sortByThreadChangeDate", false ); restoreLayout( conf, "HeaderView" ); + mInitDone = true; } @@ -209,5 +209,5 @@ void KNHeaderView::setSorting( int colum if ( column == mSortCol ) { mSortAsc = ascending; - if ( column == mPaintInfo.dateCol && ascending ) + if ( mInitDone && column == mPaintInfo.dateCol && ascending ) mSortByThreadChangeDate = !mSortByThreadChangeDate; } else { --- kdepim/knode/headerview.h #1.5:1.6 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -95,4 +95,5 @@ class KNHeaderView : public KListView { KPopupMenu *mPopup; bool mShowingFolder; + bool mInitDone; private slots:
Comment
#2
Volker Krause 2005-03-28 15:30:23
CVS commit by vkrause: Backport fix for #102574 (don't accidently toggle 'sort by thread change date' when restoring header view layout). BUG: 102574 M +6 -6 headerview.cpp 1.7.2.1 M +3 -1 headerview.h 1.4.2.1 --- kdepim/knode/headerview.cpp #1.7:1.7.2.1 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -40,5 +40,6 @@ KNHeaderView::KNHeaderView(QWidget *pare mDelayedCenter( -1 ), mActiveItem( 0 ), - mShowingFolder( false ) + mShowingFolder( false ), + mInitDone( false ) { mPaintInfo.subCol = addColumn( i18n("Subject"), 310 ); @@ -99,11 +100,10 @@ KNHeaderView::~KNHeaderView() void KNHeaderView::readConfig() { - static bool initDone = false; - if ( !initDone ) { - initDone = true; + if ( !mInitDone ) { KConfig *conf = knGlobals.config(); conf->setGroup( "HeaderView" ); mSortByThreadChangeDate = conf->readBoolEntry( "sortByThreadChangeDate", false ); restoreLayout( conf, "HeaderView" ); + mInitDone = true; } @@ -209,5 +209,5 @@ void KNHeaderView::setSorting( int colum if ( column == mSortCol ) { mSortAsc = ascending; - if ( column == mPaintInfo.dateCol && ascending ) + if ( mInitDone && column == mPaintInfo.dateCol && ascending ) mSortByThreadChangeDate = !mSortByThreadChangeDate; } else { --- kdepim/knode/headerview.h #1.4:1.4.2.1 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -23,4 +23,5 @@ class KPopupMenu; +class KNHdrViewItem; class KNHeaderView : public KListView { @@ -94,4 +95,5 @@ class KNHeaderView : public KListView { KPopupMenu *mPopup; bool mShowingFolder; + bool mInitDone; private slots:
P
latform
:
Compiled Sources
O
S
:
Linux
K
eywords
:
U
RL
:
People
Reporter
:
Malte J Wetz
Assigned To
:
KNode Developers
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In