Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Konsole
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
24
Merge Requests
24
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Utilities
Konsole
Commits
2b586e6f
Commit
2b586e6f
authored
Mar 28, 2017
by
Kurt Hindenburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use auto
parent
5e28796d
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
85 additions
and
85 deletions
+85
-85
src/Application.cpp
src/Application.cpp
+2
-2
src/ColorSchemeEditor.cpp
src/ColorSchemeEditor.cpp
+8
-8
src/ColorSchemeManager.cpp
src/ColorSchemeManager.cpp
+1
-1
src/CopyInputDialog.cpp
src/CopyInputDialog.cpp
+4
-4
src/EditProfileDialog.cpp
src/EditProfileDialog.cpp
+9
-9
src/Emulation.cpp
src/Emulation.cpp
+1
-1
src/ExtendedCharTable.cpp
src/ExtendedCharTable.cpp
+1
-1
src/Filter.cpp
src/Filter.cpp
+5
-5
src/History.cpp
src/History.cpp
+1
-1
src/HistorySizeDialog.cpp
src/HistorySizeDialog.cpp
+3
-3
src/HistorySizeWidget.cpp
src/HistorySizeWidget.cpp
+1
-1
src/IncrementalSearchBar.cpp
src/IncrementalSearchBar.cpp
+4
-4
src/KeyboardTranslatorManager.cpp
src/KeyboardTranslatorManager.cpp
+1
-1
src/MainWindow.cpp
src/MainWindow.cpp
+6
-6
src/Part.cpp
src/Part.cpp
+1
-1
src/ProfileList.cpp
src/ProfileList.cpp
+1
-1
src/RenameTabDialog.cpp
src/RenameTabDialog.cpp
+3
-3
src/Screen.cpp
src/Screen.cpp
+2
-2
src/SessionController.cpp
src/SessionController.cpp
+5
-5
src/SessionManager.cpp
src/SessionManager.cpp
+1
-1
src/TerminalDisplay.cpp
src/TerminalDisplay.cpp
+4
-4
src/ViewContainer.cpp
src/ViewContainer.cpp
+3
-3
src/ViewManager.cpp
src/ViewManager.cpp
+4
-4
src/ViewProperties.h
src/ViewProperties.h
+1
-1
src/ViewSplitter.cpp
src/ViewSplitter.cpp
+1
-1
src/ZModemDialog.cpp
src/ZModemDialog.cpp
+2
-2
src/autotests/HistoryTest.cpp
src/autotests/HistoryTest.cpp
+1
-1
src/autotests/PartTest.cpp
src/autotests/PartTest.cpp
+1
-1
src/autotests/SessionTest.cpp
src/autotests/SessionTest.cpp
+2
-2
src/autotests/TerminalTest.cpp
src/autotests/TerminalTest.cpp
+3
-3
src/main.cpp
src/main.cpp
+1
-1
src/settings/ProfileSettings.cpp
src/settings/ProfileSettings.cpp
+1
-1
src/tests/PartManualTest.cpp
src/tests/PartManualTest.cpp
+1
-1
No files found.
src/Application.cpp
View file @
2b586e6f
...
...
@@ -141,7 +141,7 @@ MainWindow* Application::newMainWindow()
{
WindowSystemInfo
::
HAVE_TRANSPARENCY
=
!
m_parser
->
isSet
(
QStringLiteral
(
"notransparency"
));
MainWindow
*
window
=
new
MainWindow
();
auto
window
=
new
MainWindow
();
connect
(
window
,
&
Konsole
::
MainWindow
::
newWindowRequest
,
this
,
&
Konsole
::
Application
::
createWindow
);
connect
(
window
,
&
Konsole
::
MainWindow
::
viewDetached
,
this
,
&
Konsole
::
Application
::
detachView
);
...
...
@@ -565,7 +565,7 @@ void Application::slotActivateRequested (QStringList args, const QString & /*wor
m_customCommand
=
getCustomCommand
(
args
);
// We can't re-use QCommandLineParser instances, it preserves earlier parsed values
QCommandLineParser
*
parser
=
new
QCommandLineParser
;
auto
parser
=
new
QCommandLineParser
;
populateCommandLineParser
(
parser
);
parser
->
parse
(
args
);
m_parser
.
reset
(
parser
);
...
...
src/ColorSchemeEditor.cpp
View file @
2b586e6f
...
...
@@ -60,9 +60,9 @@ ColorSchemeEditor::ColorSchemeEditor(QWidget* aParent)
,
_isNewScheme
(
false
)
,
_colors
(
0
)
{
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Apply
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Apply
);
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
...
@@ -92,10 +92,10 @@ ColorSchemeEditor::ColorSchemeEditor(QWidget* aParent)
connect
(
_ui
->
randomizedBackgroundCheck
,
&
QCheckBox
::
toggled
,
this
,
&
Konsole
::
ColorSchemeEditor
::
setRandomizedBackgroundColor
);
// wallpaper stuff
QFileSystemModel
*
dirModel
=
new
QFileSystemModel
(
this
);
auto
dirModel
=
new
QFileSystemModel
(
this
);
dirModel
->
setFilter
(
QDir
::
AllEntries
);
dirModel
->
setRootPath
(
QString
(
'/'
));
QCompleter
*
completer
=
new
QCompleter
(
this
);
auto
completer
=
new
QCompleter
(
this
);
completer
->
setModel
(
dirModel
);
_ui
->
wallpaperPath
->
setCompleter
(
completer
);
...
...
@@ -267,17 +267,17 @@ void ColorSchemeEditor::setupColorTable(const ColorScheme* colors)
QTableWidgetItem
*
nameItem
=
new
QTableWidgetItem
(
ColorScheme
::
translatedColorNameForIndex
(
row
));
nameItem
->
setFlags
(
nameItem
->
flags
()
&
~
Qt
::
ItemIsEditable
);
QTableWidgetItem
*
colorItem
=
new
QTableWidgetItem
();
auto
colorItem
=
new
QTableWidgetItem
();
colorItem
->
setBackground
(
table
[
row
].
color
);
colorItem
->
setFlags
(
colorItem
->
flags
()
&
~
Qt
::
ItemIsEditable
&
~
Qt
::
ItemIsSelectable
);
colorItem
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Click to choose color"
));
QTableWidgetItem
*
colorItemIntense
=
new
QTableWidgetItem
();
auto
colorItemIntense
=
new
QTableWidgetItem
();
colorItemIntense
->
setBackground
(
table
[
COLOR_TABLE_ROW_LENGTH
+
row
].
color
);
colorItemIntense
->
setFlags
(
colorItem
->
flags
()
&
~
Qt
::
ItemIsEditable
&
~
Qt
::
ItemIsSelectable
);
colorItemIntense
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Click to choose intense color"
));
QTableWidgetItem
*
colorItemFaint
=
new
QTableWidgetItem
();
auto
colorItemFaint
=
new
QTableWidgetItem
();
colorItemFaint
->
setBackground
(
table
[
2
*
COLOR_TABLE_ROW_LENGTH
+
row
].
color
);
colorItemFaint
->
setFlags
(
colorItem
->
flags
()
&
~
Qt
::
ItemIsEditable
&
~
Qt
::
ItemIsSelectable
);
colorItemFaint
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Click to choose Faint color"
));
...
...
src/ColorSchemeManager.cpp
View file @
2b586e6f
...
...
@@ -87,7 +87,7 @@ bool ColorSchemeManager::loadColorScheme(const QString& filePath)
QFileInfo
info
(
filePath
);
KConfig
config
(
filePath
,
KConfig
::
NoGlobals
);
ColorScheme
*
scheme
=
new
ColorScheme
();
auto
scheme
=
new
ColorScheme
();
scheme
->
setName
(
info
.
baseName
());
scheme
->
read
(
config
);
...
...
src/CopyInputDialog.cpp
View file @
2b586e6f
...
...
@@ -37,9 +37,9 @@ CopyInputDialog::CopyInputDialog(QWidget* parent)
:
QDialog
(
parent
)
{
setWindowTitle
(
i18n
(
"Copy Input"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
...
@@ -64,7 +64,7 @@ CopyInputDialog::CopyInputDialog(QWidget* parent)
_model
->
setCheckColumn
(
1
);
_model
->
setSessions
(
SessionManager
::
instance
()
->
sessions
());
QSortFilterProxyModel
*
filterProxyModel
=
new
QSortFilterProxyModel
(
this
);
auto
filterProxyModel
=
new
QSortFilterProxyModel
(
this
);
filterProxyModel
->
setDynamicSortFilter
(
true
);
filterProxyModel
->
setFilterCaseSensitivity
(
Qt
::
CaseInsensitive
);
filterProxyModel
->
setSourceModel
(
_model
);
...
...
src/EditProfileDialog.cpp
View file @
2b586e6f
...
...
@@ -68,8 +68,8 @@ EditProfileDialog::EditProfileDialog(QWidget* aParent)
{
setWindowTitle
(
i18n
(
"Edit Profile"
));
mButtonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Apply
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
mButtonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
...
@@ -398,7 +398,7 @@ void EditProfileDialog::selectInitialDir()
}
void
EditProfileDialog
::
setupAppearancePage
(
const
Profile
::
Ptr
profile
)
{
ColorSchemeViewDelegate
*
delegate
=
new
ColorSchemeViewDelegate
(
this
);
auto
delegate
=
new
ColorSchemeViewDelegate
(
this
);
_ui
->
colorSchemeList
->
setItemDelegate
(
delegate
);
_ui
->
transparencyWarningWidget
->
setVisible
(
false
);
...
...
@@ -716,7 +716,7 @@ void EditProfileDialog::editColorScheme()
}
void
EditProfileDialog
::
saveColorScheme
(
const
ColorScheme
&
scheme
,
bool
isNewScheme
)
{
ColorScheme
*
newScheme
=
new
ColorScheme
(
scheme
);
auto
newScheme
=
new
ColorScheme
(
scheme
);
// if this is a new color scheme, pick a name based on the description
if
(
isNewScheme
)
{
...
...
@@ -873,7 +873,7 @@ void EditProfileDialog::showKeyBindingEditor(bool isNewTranslator)
Q_ASSERT
(
translator
);
QPointer
<
QDialog
>
dialog
=
new
QDialog
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
dialog
);
auto
buttonBox
=
new
QDialogButtonBox
(
dialog
);
buttonBox
->
setStandardButtons
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
dialog
.
data
(),
&
QDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
dialog
.
data
(),
&
QDialog
::
reject
);
...
...
@@ -883,7 +883,7 @@ void EditProfileDialog::showKeyBindingEditor(bool isNewTranslator)
else
dialog
->
setWindowTitle
(
i18n
(
"Edit Key Binding List"
));
KeyBindingEditor
*
editor
=
new
KeyBindingEditor
;
auto
editor
=
new
KeyBindingEditor
;
if
(
translator
)
editor
->
setup
(
translator
);
...
...
@@ -891,13 +891,13 @@ void EditProfileDialog::showKeyBindingEditor(bool isNewTranslator)
if
(
isNewTranslator
)
editor
->
setDescription
(
i18n
(
"New Key Binding List"
));
QVBoxLayout
*
layout
=
new
QVBoxLayout
;
auto
layout
=
new
QVBoxLayout
;
layout
->
addWidget
(
editor
);
layout
->
addWidget
(
buttonBox
);
dialog
->
setLayout
(
layout
);
if
(
dialog
->
exec
()
==
QDialog
::
Accepted
)
{
KeyboardTranslator
*
newTranslator
=
new
KeyboardTranslator
(
*
editor
->
translator
());
auto
newTranslator
=
new
KeyboardTranslator
(
*
editor
->
translator
());
if
(
isNewTranslator
)
newTranslator
->
setName
(
newTranslator
->
description
());
...
...
@@ -1129,7 +1129,7 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr profile)
connect
(
_ui
->
cursorShapeCombo
,
static_cast
<
void
(
KComboBox
::*
)(
int
)
>
(
&
KComboBox
::
activated
),
this
,
&
Konsole
::
EditProfileDialog
::
setCursorShape
);
// encoding options
KCodecAction
*
codecAction
=
new
KCodecAction
(
this
);
auto
codecAction
=
new
KCodecAction
(
this
);
_ui
->
selectEncodingButton
->
setMenu
(
codecAction
->
menu
());
connect
(
codecAction
,
static_cast
<
void
(
KCodecAction
::*
)(
QTextCodec
*
)
>
(
&
KCodecAction
::
triggered
),
this
,
&
Konsole
::
EditProfileDialog
::
setDefaultCodec
);
...
...
src/Emulation.cpp
View file @
2b586e6f
...
...
@@ -77,7 +77,7 @@ void Emulation::bracketedPasteModeChanged(bool bracketedPasteMode)
ScreenWindow
*
Emulation
::
createWindow
()
{
ScreenWindow
*
window
=
new
ScreenWindow
(
_currentScreen
);
auto
window
=
new
ScreenWindow
(
_currentScreen
);
_windows
<<
window
;
connect
(
window
,
&
Konsole
::
ScreenWindow
::
selectionChanged
,
this
,
&
Konsole
::
Emulation
::
bufferedUpdate
);
...
...
src/ExtendedCharTable.cpp
View file @
2b586e6f
...
...
@@ -100,7 +100,7 @@ ushort ExtendedCharTable::createExtendedChar(const ushort* unicodePoints , ushor
// add the new sequence to the table and
// return that index
ushort
*
buffer
=
new
ushort
[
length
+
1
];
auto
buffer
=
new
ushort
[
length
+
1
];
buffer
[
0
]
=
length
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
buffer
[
i
+
1
]
=
unicodePoints
[
i
];
...
...
src/Filter.cpp
View file @
2b586e6f
...
...
@@ -133,8 +133,8 @@ void TerminalImageFilterChain::setImage(const Character* const image , int lines
decoder
.
setTrailingWhitespace
(
false
);
// setup new shared buffers for the filters to process on
QString
*
newBuffer
=
new
QString
();
QList
<
int
>*
newLinePositions
=
new
QList
<
int
>
();
auto
newBuffer
=
new
QString
();
auto
newLinePositions
=
new
QList
<
int
>
();
setBuffer
(
newBuffer
,
newLinePositions
);
// free the old buffers
...
...
@@ -458,8 +458,8 @@ void FilterObject::activated()
}
QList
<
QAction
*>
UrlFilter
::
HotSpot
::
actions
()
{
QAction
*
openAction
=
new
QAction
(
_urlObject
);
QAction
*
copyAction
=
new
QAction
(
_urlObject
);
auto
openAction
=
new
QAction
(
_urlObject
);
auto
copyAction
=
new
QAction
(
_urlObject
);
const
UrlType
kind
=
urlType
();
Q_ASSERT
(
kind
==
StandardUrl
||
kind
==
Email
);
...
...
@@ -553,7 +553,7 @@ FileFilter::HotSpot::~HotSpot()
QList
<
QAction
*>
FileFilter
::
HotSpot
::
actions
()
{
QAction
*
openAction
=
new
QAction
(
_fileObject
);
auto
openAction
=
new
QAction
(
_fileObject
);
openAction
->
setText
(
i18n
(
"Open File"
));
QObject
::
connect
(
openAction
,
SIGNAL
(
triggered
())
,
_fileObject
,
SLOT
(
activated
()));
QList
<
QAction
*>
actions
;
...
...
src/History.cpp
View file @
2b586e6f
...
...
@@ -626,7 +626,7 @@ HistoryScroll* HistoryTypeFile::scroll(HistoryScroll* old) const
for
(
int
i
=
0
;
i
<
lines
;
i
++
)
{
int
size
=
old
->
getLineLen
(
i
);
if
(
size
>
LINE_SIZE
)
{
Character
*
tmp_line
=
new
Character
[
size
];
auto
tmp_line
=
new
Character
[
size
];
old
->
getCells
(
i
,
0
,
size
,
tmp_line
);
newScroll
->
addCells
(
tmp_line
,
size
);
newScroll
->
addLine
(
old
->
isWrappedLine
(
i
));
...
...
src/HistorySizeDialog.cpp
View file @
2b586e6f
...
...
@@ -36,9 +36,9 @@ HistorySizeDialog::HistorySizeDialog(QWidget* parent)
:
QDialog
(
parent
)
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Adjust Scrollback"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
...
src/HistorySizeWidget.cpp
View file @
2b586e6f
...
...
@@ -62,7 +62,7 @@ HistorySizeWidget::HistorySizeWidget(QWidget* parent)
_ui
->
fixedSizeHistoryButton
->
setFocusProxy
(
_ui
->
historyLineSpinner
);
connect
(
_ui
->
fixedSizeHistoryButton
,
&
QRadioButton
::
clicked
,
_ui
->
historyLineSpinner
,
&
KPluralHandlingSpinBox
::
selectAll
);
QButtonGroup
*
modeGroup
=
new
QButtonGroup
(
this
);
auto
modeGroup
=
new
QButtonGroup
(
this
);
modeGroup
->
addButton
(
_ui
->
noHistoryButton
);
modeGroup
->
addButton
(
_ui
->
fixedSizeHistoryButton
);
modeGroup
->
addButton
(
_ui
->
unlimitedHistoryButton
);
...
...
src/IncrementalSearchBar.cpp
View file @
2b586e6f
...
...
@@ -47,9 +47,9 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent)
,
_findPreviousButton
(
0
)
,
_searchFromButton
(
0
)
{
QHBoxLayout
*
barLayout
=
new
QHBoxLayout
(
this
);
auto
barLayout
=
new
QHBoxLayout
(
this
);
QToolButton
*
closeButton
=
new
QToolButton
(
this
);
auto
closeButton
=
new
QToolButton
(
this
);
closeButton
->
setObjectName
(
QStringLiteral
(
"close-button"
));
closeButton
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Close the search bar"
));
closeButton
->
setAutoRaise
(
true
);
...
...
@@ -96,7 +96,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent)
_searchFromButton
->
setObjectName
(
QStringLiteral
(
"search-from-button"
));
connect
(
_searchFromButton
,
&
QToolButton
::
clicked
,
this
,
&
Konsole
::
IncrementalSearchBar
::
searchFromClicked
);
QToolButton
*
optionsButton
=
new
QToolButton
(
this
);
auto
optionsButton
=
new
QToolButton
(
this
);
optionsButton
->
setObjectName
(
QStringLiteral
(
"find-options-button"
));
optionsButton
->
setText
(
i18nc
(
"@action:button Display options menu"
,
"Options"
));
optionsButton
->
setCheckable
(
false
);
...
...
@@ -114,7 +114,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent)
barLayout
->
addWidget
(
optionsButton
);
// Fill the options menu
QMenu
*
optionsMenu
=
new
QMenu
(
this
);
auto
optionsMenu
=
new
QMenu
(
this
);
optionsButton
->
setMenu
(
optionsMenu
);
_caseSensitive
=
optionsMenu
->
addAction
(
i18nc
(
"@item:inmenu"
,
"Case sensitive"
));
...
...
src/KeyboardTranslatorManager.cpp
View file @
2b586e6f
...
...
@@ -168,7 +168,7 @@ KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(const QString& nam
KeyboardTranslator
*
KeyboardTranslatorManager
::
loadTranslator
(
QIODevice
*
source
,
const
QString
&
name
)
{
KeyboardTranslator
*
translator
=
new
KeyboardTranslator
(
name
);
auto
translator
=
new
KeyboardTranslator
(
name
);
KeyboardTranslatorReader
reader
(
source
);
translator
->
setDescription
(
reader
.
description
());
while
(
reader
.
hasNextEntry
())
...
...
src/MainWindow.cpp
View file @
2b586e6f
...
...
@@ -686,22 +686,22 @@ void MainWindow::showSettingsDialog(const bool showProfilePage)
KConfigDialog
*
settingsDialog
=
new
KConfigDialog
(
this
,
QStringLiteral
(
"settings"
),
KonsoleSettings
::
self
());
settingsDialog
->
setFaceType
(
KPageDialog
::
Tabbed
);
GeneralSettings
*
generalSettings
=
new
GeneralSettings
(
settingsDialog
);
auto
generalSettings
=
new
GeneralSettings
(
settingsDialog
);
settingsDialog
->
addPage
(
generalSettings
,
i18nc
(
"@title Preferences page name"
,
"General"
),
QStringLiteral
(
"utilities-terminal"
));
ProfileSettings
*
profileSettings
=
new
ProfileSettings
(
settingsDialog
);
auto
profileSettings
=
new
ProfileSettings
(
settingsDialog
);
KPageWidgetItem
*
profilePage
=
settingsDialog
->
addPage
(
profileSettings
,
i18nc
(
"@title Preferences page name"
,
"Profiles"
),
QStringLiteral
(
"configure"
));
TabBarSettings
*
tabBarSettings
=
new
TabBarSettings
(
settingsDialog
);
auto
tabBarSettings
=
new
TabBarSettings
(
settingsDialog
);
settingsDialog
->
addPage
(
tabBarSettings
,
i18nc
(
"@title Preferences page name"
,
"TabBar"
),
QStringLiteral
(
"system-run"
));
FileLocationSettings
*
fileLocationSettings
=
new
FileLocationSettings
(
settingsDialog
);
auto
fileLocationSettings
=
new
FileLocationSettings
(
settingsDialog
);
settingsDialog
->
addPage
(
fileLocationSettings
,
i18nc
(
"@title Preferences page name"
,
"File Location"
),
QStringLiteral
(
"configure"
));
...
...
@@ -808,8 +808,8 @@ void MainWindow::activateMenuBar()
void
MainWindow
::
setupMainWidget
()
{
QWidget
*
mainWindowWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainWindowLayout
=
new
QVBoxLayout
();
auto
mainWindowWidget
=
new
QWidget
(
this
);
auto
mainWindowLayout
=
new
QVBoxLayout
();
mainWindowLayout
->
addWidget
(
_viewManager
->
widget
());
mainWindowLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
src/Part.cpp
View file @
2b586e6f
...
...
@@ -268,7 +268,7 @@ void Part::showEditCurrentProfileDialog(QWidget* parent)
{
Q_ASSERT
(
activeSession
());
EditProfileDialog
*
dialog
=
new
EditProfileDialog
(
parent
);
auto
dialog
=
new
EditProfileDialog
(
parent
);
dialog
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
dialog
->
setProfile
(
SessionManager
::
instance
()
->
sessionProfile
(
activeSession
()));
dialog
->
show
();
...
...
src/ProfileList.cpp
View file @
2b586e6f
...
...
@@ -127,7 +127,7 @@ void ProfileList::favoriteChanged(Profile::Ptr profile, bool isFavorite)
ProfileManager
*
manager
=
ProfileManager
::
instance
();
if
(
isFavorite
)
{
QAction
*
action
=
new
QAction
(
_group
);
auto
action
=
new
QAction
(
_group
);
action
->
setData
(
QVariant
::
fromValue
(
profile
));
if
(
_addShortcuts
)
{
...
...
src/RenameTabDialog.cpp
View file @
2b586e6f
...
...
@@ -35,9 +35,9 @@ RenameTabDialog::RenameTabDialog(QWidget* parent)
:
QDialog
(
parent
)
{
setWindowTitle
(
i18n
(
"Rename Tab"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
...
src/Screen.cpp
View file @
2b586e6f
...
...
@@ -306,7 +306,7 @@ void Screen::resizeImage(int new_lines, int new_columns)
// create new screen _lines and copy from old to new
ImageLine
*
newScreenLines
=
new
ImageLine
[
new_lines
+
1
];
auto
newScreenLines
=
new
ImageLine
[
new_lines
+
1
];
for
(
int
i
=
0
;
i
<
qMin
(
_lines
,
new_lines
+
1
)
;
i
++
)
newScreenLines
[
i
]
=
_screenLines
[
i
];
for
(
int
i
=
_lines
;
(
i
>
0
)
&&
(
i
<
new_lines
+
1
);
i
++
)
...
...
@@ -662,7 +662,7 @@ void Screen::displayCharacter(unsigned short c)
if
(
oldChars
&&
extendedCharLength
<
3
)
{
Q_ASSERT
(
extendedCharLength
>
1
);
Q_ASSERT
(
extendedCharLength
<
65535
);
ushort
*
chars
=
new
ushort
[
extendedCharLength
+
1
];
auto
chars
=
new
ushort
[
extendedCharLength
+
1
];
memcpy
(
chars
,
oldChars
,
sizeof
(
ushort
)
*
extendedCharLength
);
chars
[
extendedCharLength
]
=
c
;
currentChar
.
character
=
ExtendedCharTable
::
instance
.
createExtendedChar
(
chars
,
extendedCharLength
+
1
);
...
...
src/SessionController.cpp
View file @
2b586e6f
...
...
@@ -194,7 +194,7 @@ SessionController::SessionController(Session* session , TerminalDisplay* view, Q
connect
(
_view
.
data
(),
&
Konsole
::
TerminalDisplay
::
keyPressedSignal
,
this
,
&
Konsole
::
SessionController
::
interactionHandler
);
// take a snapshot of the session state periodically in the background
QTimer
*
backgroundTimer
=
new
QTimer
(
_session
);
auto
backgroundTimer
=
new
QTimer
(
_session
);
backgroundTimer
->
setSingleShot
(
false
);
backgroundTimer
->
setInterval
(
2000
);
connect
(
backgroundTimer
,
&
QTimer
::
timeout
,
this
,
&
Konsole
::
SessionController
::
snapshot
);
...
...
@@ -1296,7 +1296,7 @@ void SessionController::beginSearch(const QString& text , int direction)
if
(
!
regExp
.
pattern
().
isEmpty
())
{
_view
->
screenWindow
()
->
setCurrentResultLine
(
-
1
);
SearchHistoryTask
*
task
=
new
SearchHistoryTask
(
this
);
auto
task
=
new
SearchHistoryTask
(
this
);
connect
(
task
,
&
Konsole
::
SearchHistoryTask
::
completed
,
this
,
&
Konsole
::
SessionController
::
searchCompleted
);
...
...
@@ -1415,7 +1415,7 @@ void SessionController::print_screen()
QPrinter
printer
;
QPointer
<
QPrintDialog
>
dialog
=
new
QPrintDialog
(
&
printer
,
_view
);
PrintOptions
*
options
=
new
PrintOptions
();
auto
options
=
new
PrintOptions
();
dialog
->
setOptionTabs
(
QList
<
QWidget
*>
()
<<
options
);
dialog
->
setWindowTitle
(
i18n
(
"Print Shell"
));
...
...
@@ -1527,7 +1527,7 @@ void SessionController::showDisplayContextMenu(const QPoint& position)
setClientBuilder
(
new
KXMLGUIBuilder
(
_view
));
}
KXMLGUIFactory
*
factory
=
new
KXMLGUIFactory
(
clientBuilder
(),
this
);
auto
factory
=
new
KXMLGUIFactory
(
clientBuilder
(),
this
);
factory
->
addClient
(
this
);
////qDebug() << "Created xmlgui factory" << factory;
}
...
...
@@ -1536,7 +1536,7 @@ void SessionController::showDisplayContextMenu(const QPoint& position)
if
(
popup
)
{
// prepend content-specific actions such as "Open Link", "Copy Email Address" etc.
QList
<
QAction
*>
contentActions
=
_view
->
filterActions
(
position
);
QAction
*
contentSeparator
=
new
QAction
(
popup
);
auto
contentSeparator
=
new
QAction
(
popup
);
contentSeparator
->
setSeparator
(
true
);
contentActions
<<
contentSeparator
;
popup
->
insertActions
(
popup
->
actions
().
value
(
0
,
0
),
contentActions
);
...
...
src/SessionManager.cpp
View file @
2b586e6f
...
...
@@ -92,7 +92,7 @@ Session* SessionManager::createSession(Profile::Ptr profile)
ProfileManager
::
instance
()
->
addProfile
(
profile
);
//configuration information found, create a new session based on this
Session
*
session
=
new
Session
();
auto
session
=
new
Session
();
Q_ASSERT
(
session
);
applyProfile
(
session
,
profile
,
false
);
...
...
src/TerminalDisplay.cpp
View file @
2b586e6f
...
...
@@ -1120,7 +1120,7 @@ void TerminalDisplay::updateImage()
const
int
linesToUpdate
=
qMin
(
this
->
_lines
,
qMax
(
0
,
lines
));
const
int
columnsToUpdate
=
qMin
(
this
->
_columns
,
qMax
(
0
,
columns
));
char
*
dirtyMask
=
new
char
[
columnsToUpdate
+
2
];
auto
dirtyMask
=
new
char
[
columnsToUpdate
+
2
];
QRegion
dirtyRegion
;
// debugging variable, this records the number of lines that are found to
...
...
@@ -2898,7 +2898,7 @@ void TerminalDisplay::copyToX11Selection()
return
;
QString
html
=
_screenWindow
->
selectedText
(
_preserveLineBreaks
,
_trimTrailingSpaces
,
true
);
QMimeData
*
mimeData
=
new
QMimeData
;
auto
mimeData
=
new
QMimeData
;
mimeData
->
setText
(
text
);
mimeData
->
setHtml
(
html
);
...
...
@@ -2920,7 +2920,7 @@ void TerminalDisplay::copyToClipboard()
return
;
QString
html
=
_screenWindow
->
selectedText
(
_preserveLineBreaks
,
_trimTrailingSpaces
,
true
);
QMimeData
*
mimeData
=
new
QMimeData
;
auto
mimeData
=
new
QMimeData
;
mimeData
->
setText
(
text
);
mimeData
->
setHtml
(
html
);
...
...
@@ -3415,7 +3415,7 @@ void TerminalDisplay::doDrag()
{
_dragInfo
.
state
=
diDragging
;
_dragInfo
.
dragObject
=
new
QDrag
(
this
);
QMimeData
*
mimeData
=
new
QMimeData
();
auto
mimeData
=
new
QMimeData
();
mimeData
->
setText
(
QApplication
::
clipboard
()
->
mimeData
(
QClipboard
::
Selection
)
->
text
());
mimeData
->
setHtml
(
QApplication
::
clipboard
()
->
mimeData
(
QClipboard
::
Selection
)
->
html
());
_dragInfo
.
dragObject
->
setMimeData
(
mimeData
);
...
...
src/ViewContainer.cpp
View file @
2b586e6f
...
...
@@ -293,8 +293,8 @@ TabbedViewContainer::TabbedViewContainer(NavigationPosition position, ViewManage
_newTabButton
->
setWhatsThis
(
i18nc
(
"@info:whatsthis"
,
"Create a new tab. Press and hold to select profile from menu"
));
_newTabButton
->
adjustSize
();
QMenu
*
profileMenu
=
new
QMenu
(
_newTabButton
);
ProfileList
*
profileList
=
new
ProfileList
(
false
,
profileMenu
);
auto
profileMenu
=
new
QMenu
(
_newTabButton
);
auto
profileList
=
new
ProfileList
(
false
,
profileMenu
);
profileList
->
syncWidgetActions
(
profileMenu
,
true
);
connect
(
profileList
,
&
Konsole
::
ProfileList
::
profileSelected
,
this
,
static_cast
<
void
(
TabbedViewContainer
::*
)(
Profile
::
Ptr
)
>
(
&
Konsole
::
TabbedViewContainer
::
newViewRequest
));
setNewViewMenu
(
profileMenu
);
...
...
@@ -716,7 +716,7 @@ StackedViewContainer::StackedViewContainer(QObject* parent)
:
ViewContainer
(
NavigationPositionTop
,
parent
)
{
_containerWidget
=
new
QWidget
;
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
_containerWidget
);
auto
layout
=
new
QVBoxLayout
(
_containerWidget
);
_stackWidget
=
new
QStackedWidget
(
_containerWidget
);
...
...
src/ViewManager.cpp
View file @
2b586e6f
...
...
@@ -209,7 +209,7 @@ void ViewManager::setupActions()
// Switch to tab N shortcuts
const
int
SWITCH_TO_TAB_COUNT
=
19
;
QSignalMapper
*
switchToTabMapper
=
new
QSignalMapper
(
this
);
auto
switchToTabMapper
=
new
QSignalMapper
(
this
);
connect
(
switchToTabMapper
,
static_cast
<
void
(
QSignalMapper
::*
)(
int
)
>
(
&
QSignalMapper
::
mapped
),
this
,
&
Konsole
::
ViewManager
::
switchToView
);
for
(
int
i
=
0
;
i
<
SWITCH_TO_TAB_COUNT
;
i
++
)
{
QAction
*
switchToTabAction
=
new
QAction
(
i18nc
(
"@action Shortcut entry"
,
"Switch to Tab %1"
,
i
+
1
),
this
);
...
...
@@ -485,7 +485,7 @@ SessionController* ViewManager::createController(Session* session , TerminalDisp
{
// create a new controller for the session, and ensure that this view manager
// is notified when the view gains the focus
SessionController
*
controller
=
new
SessionController
(
session
,
view
,
this
);
auto
controller
=
new
SessionController
(
session
,
view
,
this
);
connect
(
controller
,
&
Konsole
::
SessionController
::
focused
,
this
,
&
Konsole
::
ViewManager
::
controllerChanged
);
connect
(
session
,
&
Konsole
::
Session
::
destroyed
,
controller
,
&
Konsole
::
SessionController
::
deleteLater
);
connect
(
session
,
&
Konsole
::
Session
::
primaryScreenInUse
,
controller
,
&
Konsole
::
SessionController
::
setupPrimaryScreenSpecificActions
);
...
...
@@ -598,7 +598,7 @@ ViewContainer* ViewManager::createContainer()
switch
(
_navigationMethod
)
{
case
TabbedNavigation
:
{
TabbedViewContainer
*
tabbedContainer
=
new
TabbedViewContainer
(
_navigationPosition
,
this
,
_viewSplitter
);
auto
tabbedContainer
=
new
TabbedViewContainer
(
_navigationPosition
,
this
,
_viewSplitter
);
container
=
tabbedContainer
;
connect
(
tabbedContainer
,
&
TabbedViewContainer
::
detachTab
,
this
,
&
ViewManager
::
detachView
);
...
...
@@ -751,7 +751,7 @@ void ViewManager::viewDestroyed(QWidget* view)
TerminalDisplay
*
ViewManager
::
createTerminalDisplay
(
Session
*
session
)
{
TerminalDisplay
*
display
=
new
TerminalDisplay
(
0
);
auto
display
=
new
TerminalDisplay
(
0
);
display
->
setRandomSeed
(
session
->
sessionId
()
*
31
);
return
display
;
...
...
src/ViewProperties.h
View file @
2b586e6f
...
...
@@ -93,7 +93,7 @@ public:
* be deleted by the caller.
*/
static
QMimeData
*
createMimeData
(
int
id
)
{
QMimeData
*
mimeData
=
new
QMimeData
;
auto
mimeData
=
new
QMimeData
;
mimeData
->
setData
(
mimeType
(),
QByteArray
::
number
(
id
));
return
mimeData
;
}
...
...
src/ViewSplitter.cpp
View file @
2b586e6f
...
...
@@ -149,7 +149,7 @@ void ViewSplitter::addContainer(ViewContainer* container ,
splitter
->
updateSizes
();
}
else
{
ViewSplitter
*
newSplitter
=
new
ViewSplitter
(
this
);
auto
newSplitter
=
new
ViewSplitter
(
this
);
connect
(
newSplitter
,
&
Konsole
::
ViewSplitter
::
empty
,
splitter
,
&
Konsole
::
ViewSplitter
::
childEmpty
);
ViewContainer
*
oldContainer
=
splitter
->
activeContainer
();
...
...
src/ZModemDialog.cpp
View file @
2b586e6f
...
...
@@ -37,8 +37,8 @@ ZModemDialog::ZModemDialog(QWidget* aParent, bool modal, const QString& caption)
setWindowTitle
(
caption
);
mButtonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
mUser1Button
=
new
QPushButton
;
...
...
src/autotests/HistoryTest.cpp
View file @
2b586e6f
...
...
@@ -64,7 +64,7 @@ void HistoryTest::testCompactHistory()
void
HistoryTest
::
testEmulationHistory
()
{
Session
*
session
=
new
Session
();
auto
session
=
new
Session
();
Emulation
*
emulation
=
session
->
emulation
();
const
HistoryType
&
historyTypeDefault
=
emulation
->
history
();
...
...
src/autotests/PartTest.cpp
View file @
2b586e6f
...
...
@@ -84,7 +84,7 @@ void PartTest::testFd()
ptyProcess
.
pty
()
->
setSuspended
(
true
);
QPointer
<
QDialog
>
dialog
=
new
QDialog
();
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
dialog
.
data
());
auto
layout
=
new
QVBoxLayout
(
dialog
.
data
());
layout
->
addWidget
(
new
QLabel
(
QStringLiteral
(
"Output of 'ping localhost' should appear in a terminal below for 5 seconds"
)));
layout
->
addWidget
(
terminalPart
->
widget
());
QTimer
::
singleShot
(
5000
,
dialog
.
data
(),
SLOT
(
close
()));
...
...
src/autotests/SessionTest.cpp
View file @
2b586e6f
...
...
@@ -31,7 +31,7 @@ using namespace Konsole;
void
SessionTest
::
testNoProfile
()
{
Session
*
session
=
new
Session
();
auto
session
=
new
Session
();
// No profile loaded, nothing to run
QCOMPARE
(
session
->
isRunning
(),
false
);
...
...
@@ -47,7 +47,7 @@ void SessionTest::testNoProfile()
void
SessionTest
::
testEmulation
()
{
Session
*
session
=
new
Session
();
auto
session
=
new
Session
();
Emulation
*
emulation
=
session
->
emulation
();
...
...
src/autotests/TerminalTest.cpp
View file @
2b586e6f
...
...
@@ -32,7 +32,7 @@ using namespace Konsole;
void
TerminalTest
::
testScrollBarPositions
()
{
TerminalDisplay
*
display
=
new
TerminalDisplay
(
0
);
auto
display
=
new
TerminalDisplay
(
0
);
// ScrollBar Positions
display
->
setScrollBarPosition
(
Enum
::
ScrollBarLeft
);
...
...
@@ -61,7 +61,7 @@ void TerminalTest::testColorTable()
ColorEntry
(
QColor
(
0x54
,
0xFF
,
0xFF
)),
ColorEntry
(
QColor
(
0x00
,
0xFF
,
0xFF
))
};
TerminalDisplay
*
display
=
new
TerminalDisplay
(
0
);
auto
display
=
new
TerminalDisplay
(
0
);