Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
f2c3d18e
Commit
f2c3d18e
authored
Jul 15, 2020
by
Gustavo Carneiro
Browse files
Move HistoryScrollNone Class to a new file.
parent
2d52fb86
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
f2c3d18e
...
...
@@ -67,6 +67,7 @@ set(konsoleprivate_SRCS ${sessionadaptors_SRCS}
HistoryFile.cpp
HistoryScroll.cpp
HistoryScrollFile.cpp
HistoryScrollNone.cpp
HistorySizeDialog.cpp
widgets/HistorySizeWidget.cpp
widgets/IncrementalSearchBar.cpp
...
...
src/History.cpp
View file @
f2c3d18e
...
...
@@ -60,47 +60,6 @@ using namespace Konsole;
at constant costs.
*/
// History Scroll None //////////////////////////////////////
HistoryScrollNone
::
HistoryScrollNone
()
:
HistoryScroll
(
new
HistoryTypeNone
())
{
}
HistoryScrollNone
::~
HistoryScrollNone
()
=
default
;
bool
HistoryScrollNone
::
hasScroll
()
{
return
false
;
}
int
HistoryScrollNone
::
getLines
()
{
return
0
;
}
int
HistoryScrollNone
::
getLineLen
(
int
)
{
return
0
;
}
bool
HistoryScrollNone
::
isWrappedLine
(
int
/*lineno*/
)
{
return
false
;
}
void
HistoryScrollNone
::
getCells
(
int
,
int
,
int
,
Character
[])
{
}
void
HistoryScrollNone
::
addCells
(
const
Character
[],
int
)
{
}
void
HistoryScrollNone
::
addLine
(
bool
)
{
}
////////////////////////////////////////////////////////////////
// Compact History Scroll //////////////////////////////////////
////////////////////////////////////////////////////////////////
...
...
src/History.h
View file @
f2c3d18e
...
...
@@ -34,32 +34,14 @@
// History
#include "HistoryFile.h"
#include "HistoryScroll.h"
#include "HistoryScrollFile.h"
#include "HistoryScrollNone.h"
// Konsole
#include "Character.h"
namespace
Konsole
{
//////////////////////////////////////////////////////////////////////
// Nothing-based history (no history :-)
//////////////////////////////////////////////////////////////////////
class
KONSOLEPRIVATE_EXPORT
HistoryScrollNone
:
public
HistoryScroll
{
public:
HistoryScrollNone
();
~
HistoryScrollNone
()
override
;
bool
hasScroll
()
override
;
int
getLines
()
override
;
int
getLineLen
(
int
lineno
)
override
;
void
getCells
(
int
lineno
,
int
colno
,
int
count
,
Character
res
[])
override
;
bool
isWrappedLine
(
int
lineno
)
override
;
void
addCells
(
const
Character
a
[],
int
count
)
override
;
void
addLine
(
bool
previousWrapped
=
false
)
override
;
};
//////////////////////////////////////////////////////////////////////
// History using compact storage
// This implementation uses a list of fixed-sized blocks
...
...
src/HistoryScrollNone.cpp
0 → 100644
View file @
f2c3d18e
/*
This file is part of Konsole, an X terminal.
Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
// Own
#include "HistoryScrollNone.h"
#include "History.h"
using
namespace
Konsole
;
// History Scroll None //////////////////////////////////////
HistoryScrollNone
::
HistoryScrollNone
()
:
HistoryScroll
(
new
HistoryTypeNone
())
{
}
HistoryScrollNone
::~
HistoryScrollNone
()
=
default
;
bool
HistoryScrollNone
::
hasScroll
()
{
return
false
;
}
int
HistoryScrollNone
::
getLines
()
{
return
0
;
}
int
HistoryScrollNone
::
getLineLen
(
int
)
{
return
0
;
}
bool
HistoryScrollNone
::
isWrappedLine
(
int
/*lineno*/
)
{
return
false
;
}
void
HistoryScrollNone
::
getCells
(
int
,
int
,
int
,
Character
[])
{
}
void
HistoryScrollNone
::
addCells
(
const
Character
[],
int
)
{
}
void
HistoryScrollNone
::
addLine
(
bool
)
{
}
src/HistoryScrollNone.h
0 → 100644
View file @
f2c3d18e
/*
This file is part of Konsole, an X terminal.
Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
#ifndef HISTORYSCROLLNONE_H
#define HISTORYSCROLLNONE_H
#include "konsoleprivate_export.h"
#include "HistoryScroll.h"
namespace
Konsole
{
//////////////////////////////////////////////////////////////////////
// Nothing-based history (no history :-)
//////////////////////////////////////////////////////////////////////
class
KONSOLEPRIVATE_EXPORT
HistoryScrollNone
:
public
HistoryScroll
{
public:
HistoryScrollNone
();
~
HistoryScrollNone
()
override
;
bool
hasScroll
()
override
;
int
getLines
()
override
;
int
getLineLen
(
int
lineno
)
override
;
void
getCells
(
int
lineno
,
int
colno
,
int
count
,
Character
res
[])
override
;
bool
isWrappedLine
(
int
lineno
)
override
;
void
addCells
(
const
Character
a
[],
int
count
)
override
;
void
addLine
(
bool
previousWrapped
=
false
)
override
;
};
}
#endif
src/autotests/HistoryTest.cpp
View file @
f2c3d18e
...
...
@@ -26,7 +26,6 @@
#include "../session/Session.h"
#include "../Emulation.h"
#include "../History.h"
#include "../HistoryScrollFile.h"
using
namespace
Konsole
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment