Revision 96164b9...
Go back to digest for 5th January 2014Other in KDE Base
break down the katession.h/.cpp files
Changes:
One class per file. Code is now testable (almost) independently from
the app, so adding bunch of unit tests.
KateSession
* simple container
* remove read/writeConfig() in favour of config()
* move rename method to manager
* decouple name from filename (manager does the coupling now)
* hide constructor in favour of factories returning KateSession::Ptr
* not dependent on KateSessionManager anymore
* add sorting functions
* add timestamp (last time the session was saved)
KateSessionManager
* add activeSession(QString, bool, bool, bool)
* add activeAnonymousSession()
* change internal storage from QList to QHash (faster lookups)
* remove sorting from sessionList() to callers
* use KDirWatch to monitor session dir (this removes the constant
updates of m_sessions)
KateSessionsAction
* add possibility to depency-inject the KateSessionManager
* sort by modification time (desc)
* limit to ten items
* disable action, when there are no sessions
KateSessionChooser
* guarantee that selectedSession() will be valid, when result is resultOpen or
resultCopy. This simplifies the KateSessionManager workflow.
FIXED-IN: 5.0
File Changes
- autotests/kate/CMakeLists.txt
- autotests/kate/session_manager_test.cpp
- autotests/kate/session_manager_test.h
- autotests/kate/session_test.cpp
- autotests/kate/session_test.h
- autotests/kate/sessions_action_test.cpp
- autotests/kate/sessions_action_test.h
- kate/app/session/katesession.cpp
- kate/app/session/katesession.h
- kate/app/session/katesessionchooser.cpp
- kate/app/session/katesessionchooser.h
- kate/app/session/katesessionchooseritem.h
- kate/app/session/katesessionmanagedialog.cpp
- kate/app/session/katesessionmanagedialog.h
- kate/app/session/katesessionmanager.cpp
- kate/app/session/katesessionmanager.h
- kate/app/session/katesessionopendialog.cpp
- kate/app/session/katesessionopendialog.h
- kate/app/session/katesessionsaction.cpp
- kate/app/session/katesessionsaction.h
- /app
- kate/katesession.cpp
- kate/katesession.h
- autotests/CMakeLists.txt
- kate/app/CMakeLists.txt
- kate/app/kateapp.cpp
- kate/app/kateapp.h
- kate/app/kateappadaptor.cpp
- kate/app/kateconfigdialog.cpp
- kate/app/katemainwindow.cpp
- kate/app/kateviewspace.cpp