Commit Graph

62 Commits

Author SHA1 Message Date
Kurt Hindenburg
cdf2b2bc78 Switch from c-style casting to c++ casting via static_cast 2012-12-19 21:20:18 -05:00
Jekyll Wu
2f7608aca9 Rename member variables to follow the common naming style used in konsole 2012-05-18 22:20:23 +08:00
Jekyll Wu
f77f78a71d Use 0 inplace of NULL 2012-05-18 20:18:51 +08:00
Jekyll Wu
f2151c5e29 Memory-based history should save and restore the 'isRealCharacter' field
Apparently I didn't take a close look at the implementation detail of
memory-based history when I added the 'isRealCharacter' flag. That
missing information causes some wrong behaviors randomly when using
memory-based history.

This is a follow up of commit dc2b64d33(for BUG 188528)

BUG: 294330
BUG: 299252
FIXED-IN: 4.8.4
2012-05-17 20:02:39 +08:00
Kurt Hindenburg
bee9aa8f78 minor style fixes - remove empty lines start/end code blocks 2012-05-13 10:08:05 -04:00
Kurt Hindenburg
5b083640ce whitespace and style fixes
Use 'git diff -w --ignore-all-space' to see non-whitespace changes
2012-04-05 11:08:53 -04:00
Kurt Hindenburg
e0862c603a Style fixes - separte commands - remove 2 ; - align { elses 2012-03-18 15:57:48 -04:00
Kurt Hindenburg
519e2614d6 Style fixes - remove spaces before ; and add spaces in for loops 2012-03-18 15:11:06 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Kurt Hindenburg
7428abab6c -Wshadow fixes to parameter names and variable names 2012-03-06 09:15:41 -05:00
Jekyll Wu
90469a094a Add more constness 2012-03-06 02:00:15 +08:00
Jekyll Wu
26331fc17c assert ==> Q_ASSERT 2012-03-01 19:30:56 +08:00
Jekyll Wu
3b7e953523 Yet another around of cleaning up #includes 2012-02-22 07:18:30 +08:00
Kurt Hindenburg
d087f9667a Switch from using KTemporaryFile to using QTemporaryFile
Also change the temp file names so people know what they are.
konsole-XXXXXX.history
2012-01-08 12:24:35 -05:00
Kurt Hindenburg
898d889890 Apply astyle-kdelibs a little more
Use 'diff -w --ignore-all-space' to see non-whitespace changes.
2012-01-08 09:57:12 -05:00
Kurt Hindenburg
048160153a Remove more unused code 2012-01-07 16:05:23 -05:00
Kurt Hindenburg
5a5db5915b Remove unused code 2012-01-07 15:38:18 -05:00
Kurt Hindenburg
fa0459f9c6 Remove BlockArray and unused code dealing w/ History. 2011-12-24 19:29:05 -05:00
Kurt Hindenburg
fe54ca3745 Apply astyle-kdelibs
Over the years, the coding style is all over the place.

Use 'git diff -w --ignore-all-space' to see non-whitespace changes.
2011-12-24 10:27:43 -05:00
Jekyll Wu
125e2c7bd2 Declare pointer and reference in a consistent way
Most code use the "const QString& text" form, instead of the "const
QString &text" form. So change the minority to be consistent with
the majority.
2011-11-06 06:13:28 +08:00
Jekyll Wu
80ec2d216b Delete some kDebug messages 2011-11-06 03:47:14 +08:00
Jekyll Wu
330de6c6f4 Fix some spelling problems 2011-11-06 03:41:20 +08:00
Jekyll Wu
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Jekyll Wu
124fe7fddc Make internal constant static 2011-11-02 06:57:54 +08:00
Jekyll Wu
9f8969eb27 Remove some very old FIXMEs
I am not sure they all are already fixed, but taking their age into
consideration, leaving them there would be more confusing than helpful.
2011-11-02 06:54:23 +08:00
Jekyll Wu
c2cc2f76ed Use size of -1 to indicate unlimited history, instead of the current 0
The old way has one problem: HistoryFileNone::isUnlimited() returned
true because HistoryFileNone::maximumLineCount() returned 0. Although
that did not cause problem for practical usage, it was still quite odd.
2011-11-02 06:23:40 +08:00
Jekyll Wu
d54b36c206 Remove unused method getFileName() 2011-11-02 05:01:17 +08:00
Jekyll Wu
aea71d8892 Comment out two deprecated implementations for history of fixed size
The code of class HistoryScrollBuffer and HistoryScrollBlockArray are
quite old and not in use for quite some time. The current implementation
for history of fixed size is class CompactHistoryType.

Maybe those deprecated classes should be totally removed , but at the
moment just leave theme there as reference.
2011-11-02 01:04:29 +08:00
Jekyll Wu
e8936cb514 Eliminate compiler warning 2011-10-14 02:50:51 +08:00
Jekyll Wu
524ed31ed7 Remove dead comment and #define 2011-10-13 20:09:33 +08:00
Jekyll Wu
37a8f1e75c Less #defines, more constants 2011-10-13 20:08:07 +08:00
Jekyll Wu
98ff411fed More const-ness. 2011-10-04 21:47:06 +08:00
Jekyll Wu
8bc24d6bcc Remove the use of deprecated k_funcinfo. 2011-09-27 22:29:23 +08:00
Jekyll Wu
272ac9850e Include KDE headers consistently in the from of "#include <KSomething>" .
However, some KDE headers are still only available in the form of
"#include <ksomething.h>"

krun.h              ==>     KRun
kicon.h             ==>     KIcon
kdebug.h            ==>     KDebug
kshell.h            ==>     KShell
kdialog.h           ==>     KDialog
kconfig.h           ==>     KConfig
klocale.h           ==>     KLocale
kglobal.h           ==>     KGlobal
kcolorutils.h       ==>     KColorUtils
kconfiggroup.h      ==>     KConfigGroup
kdesktopfile.h      ==>     KDesktopFile
kcolorscheme.h      ==>     KColorScheme
kstandarddirs.h     ==>     KStandardDirs
ktemporaryfile.h    ==>     KTemporaryFile
klocalizedstring.h  ==>     KLocalizedString
2011-09-23 05:04:46 +08:00
Jaime Torres
7407585c15 Initialize the read write balance counter
Initialize the _readwritebalance member to 0.

If this is not initialized, at random konsole runs, the history could
not be mmaped even if lseek is slower.
Also, remove a valgrind warning about jump using unitialized value.
2011-09-18 10:51:04 +02:00
Jekyll Wu
1233aa0f97 Initialize _maxLineCount in the initilization list directly. 2011-09-07 00:48:40 +08:00
Jekyll Wu
57a83187ce Remove unused member variable m_logFileName. 2011-09-07 00:48:40 +08:00
Jekyll Wu
87b98de419 Rename member variable m_histType to _historyType. 2011-09-07 00:48:40 +08:00
Jekyll Wu
45daca783f Declare HistoryFile::isMapped() as const method. 2011-09-07 00:48:40 +08:00
Jekyll Wu
4455c2a59f Rename member variable fileMap and readWriteBalance. 2011-09-07 00:48:40 +08:00
Jekyll Wu
31ba6915b2 Rename member variable length to _length. 2011-09-07 00:48:40 +08:00
Jekyll Wu
02165475ea Rename member variable tmpFile to _tmpFile. 2011-09-07 00:48:40 +08:00
Jekyll Wu
1f1b54e733 Rename member varibale ion to _fd.
It store an file descriptor, so _fd is more natural than ion.
2011-09-07 00:48:40 +08:00
Albert Astals Cid
22a80e9126 Assignint to yourself is not really necesssary :D 2011-07-12 14:07:59 +01:00
Kurt Hindenburg
6b2440e2c2 comment out kDebugs - change some to kWarnings
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1148447
2010-07-10 17:22:28 +00:00
Kurt Hindenburg
80a3b9e67a align the declaration with the defination
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1092491
2010-02-19 03:50:20 +00:00
Darío Andrés Rodríguez
b8a3bdd833 - Reduce the ammount of unused vars/parameters warnings
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1049628
2009-11-15 15:41:16 +00:00
Kurt Hindenburg
31aea137a8 Fix some build warning and a krazy issue.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1033923
2009-10-11 15:42:12 +00:00
Pino Toscano
0b0ed49cc0 initialize in the correct order
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1025870
2009-09-19 22:47:55 +00:00
Robert Knight
5c55fd0154 Greatly reduce memory usage required by Konsole's scrollback buffer and improve releasing of scrollback memory to OS when no longer needed.
* Reduce amount of memory required for representing characters in scrollback buffer by not storing formatting data for each character.  Instead store UTF-16 characters and formatting ranges
* Allocate memory for scrollback buffer use a custom mmap-based memory pool - this allows the memory to be released to the OS sooner when freed.

There is a small performance cost when printing a large number of lines - see bug report for figures.

Patch by Michael Meier

REVIEW: http://reviewboard.kde.org/r/802/
BUG:176974


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=987102
2009-06-25 15:33:20 +00:00