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
2b586e6f
Commit
2b586e6f
authored
Mar 28, 2017
by
Kurt Hindenburg
Browse files
use auto
parent
5e28796d
Changes
33
Hide whitespace changes
Inline
Side-by-side
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
)
{
QHBoxLayo
ut
*
barLayout
=
new
QHBoxLayout
(
this
);
a
ut
o
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
);
QVBoxLayo
ut
*
mainWindowLayout
=
new
QVBoxLayout
();
auto
mainWindowWidget
=
new
QWidget
(
this
);
a
ut
o
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
);
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
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