[Bug 213370] New: Channel Settings dialog fails to refresh topic information upon subsequent openings

View: New views
3 Messages — Rating Filter:   Alert me  

[Bug 213370] New: Channel Settings dialog fails to refresh topic information upon subsequent openings

by Bugzilla from luke-jr+kdebugs@utopios.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=213370

           Summary: Channel Settings dialog fails to refresh topic
                    information upon subsequent openings
           Product: konversation
           Version: 1.2
          Platform: Gentoo Packages
        OS/Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: konversation-devel@...
        ReportedBy: luke-jr+kdebugs@...


Version:           1.2 (using KDE 4.3.2)
Installed from:    Gentoo Packages

[22:02:03] <luke-jr> Channel Settings dialog doesn't reset its copy of the
topic when someone else changes it, so if I go in there to change modes, it
accidentally resets the topic too..

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konversation-devel mailing list
Konversation-devel@...
https://mail.kde.org/mailman/listinfo/konversation-devel

[Bug 213370] Channel Settings dialog fails to refresh topic information upon subsequent openings

by Bugzilla from hein@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=213370


Eike Hein <hein@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hein@...




--- Comment #1 from Eike Hein <hein kde org>  2009-11-07 02:51:34 ---
Ok, here's some background on this:

1. Whenever the client receives channel topic data (i.e. on channel join or
when someone changes the channel topic), the topic history list in the dialog
is updated. The same code is apparently also run whenever the dialog is
constructed.

2. When someone changes the channel topic and a new item is added to the list,
the selection changes to that new item. The upper text widget in the dialog
always shows the topic currently selected in the list, and thus changes
accordingly.

3. When the text in the lower text widget in the dialog is changed, a bool
m_editingTopic is set to true.

4. During #1, the lower text widget in the dialog is set to the first item in
the topic history list only if the history is not empty (duh) and
m_editingTopic is not true.

5. m_editingTopic is set to false only when the dialog is cancelled.


IOW, the reason for this problem is that code was written to avoid topic
changes interfering with the user editing the topic himself in the lower text
widget, but there are two problems:

- The protection is overzealous: It appears that #4 alone causes #3, not just
user-originated changes to the widget's contents. This means that when someone
changes the topic while the dialog is open, the topic in the lower text widget
will not be updated, even when the user hasn't actually touched the widget (the
list and upper text widgets update correctly, however).

- m_editingTopic isn't reset to false when the dialog is closed with "Ok". So
when the user 1. edits the topic in the dialog (or some mode), 2. then OK's it,
3. then someone else changes the topic and 4. the user subsequently reopens the
dialog, the lower text widget will still show the contents from when it was
opened and OK'd previously.

The bottom line here is probably that the behavior should be changed so that
the two text widgets update in sync with the selection in the list unless the
user has actually modified the contents of the lower text widget, and that
closing the dialog in any way (i.e. both OK and Cancel, where Cancel includes
closing the window) should make it forget that the user has modified the lower
text widget.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konversation-devel mailing list
Konversation-devel@...
https://mail.kde.org/mailman/listinfo/konversation-devel

[Bug 213370] Channel Settings dialog fails to refresh topic information upon subsequent openings

by Bugzilla from hein@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://bugs.kde.org/show_bug.cgi?id=213370


Eike Hein <hein@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Eike Hein <hein kde org>  2009-11-07 03:29:34 ---
SVN commit 1045997 by hein:

* Making and then comitting unrelated changes in the Channel Settings
  dialog could cause unintentionally setting the channel's topic to an
  older version if someone else had changed the topic since the first
  time the dialog was opened or while the dialog was open, due to a bug
  in the code that avoids such external topic changes interfering with
  concurrent local editing of the topic. This has been fixed.
* The contents of the topic edit field in the Channel Settings dialog
  will now reflect the selected item in the topic history list until
  the user starts editing.

(Ended up abusing QTextEdit::undoAvailable() to get something akin to
QLineEdit::textEdited() for QTextEdit, and QTextEdit::clear() to flush
the undo history at dialog close to kick the selection->textedit sync
back into gear for the next dialog open.)

BUG:213370


 M  +9 -0      ChangeLog  
 M  +11 -8     src/irc/channeloptionsdialog.cpp  
 M  +1 -1      src/irc/channeloptionsdialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1045997

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konversation-devel mailing list
Konversation-devel@...
https://mail.kde.org/mailman/listinfo/konversation-devel