Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
329f63a7
Commit
329f63a7
authored
Jul 16, 2021
by
Laurent Montel
Browse files
const'ify pointer
parent
f77f7e97
Pipeline
#70597
failed with stage
in 18 minutes and 42 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.cpp
View file @
329f63a7
...
...
@@ -15,11 +15,11 @@
ViewerPluginExternalEditDialog
::
ViewerPluginExternalEditDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mEditWidget
(
new
ViewerPluginExternalEditWidget
(
this
))
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Add or Modify External Script"
));
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mEditWidget
=
new
ViewerPluginExternalEditWidget
(
this
);
mEditWidget
->
setObjectName
(
QStringLiteral
(
"editwidget"
));
mainLayout
->
addWidget
(
mEditWidget
);
connect
(
mEditWidget
,
&
ViewerPluginExternalEditWidget
::
scriptIsValid
,
this
,
&
ViewerPluginExternalEditDialog
::
slotScriptIsValid
);
...
...
plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.h
View file @
329f63a7
...
...
@@ -29,7 +29,7 @@ private:
void
saveConfig
();
void
slotScriptIsValid
(
bool
valid
);
void
slotAccepted
();
ViewerPluginExternalEditWidget
*
mEditWidget
=
nullptr
;
ViewerPluginExternalEditWidget
*
const
mEditWidget
;
QPushButton
*
mOkButton
=
nullptr
;
};
plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.cpp
View file @
329f63a7
...
...
@@ -15,22 +15,23 @@
ViewerPluginExternalEditWidget
::
ViewerPluginExternalEditWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mName
(
new
QLineEdit
(
this
))
,
mDescription
(
new
QLineEdit
(
this
))
,
mCommandLine
(
new
QLineEdit
(
this
))
,
mExecutable
(
new
KUrlRequester
(
this
))
{
auto
mainLayout
=
new
QFormLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mainLayout
->
setContentsMargins
({});
mName
=
new
QLineEdit
(
this
);
mName
->
setObjectName
(
QStringLiteral
(
"name"
));
mainLayout
->
addRow
(
i18n
(
"Name:"
),
mName
);
new
KPIM
::
LineEditCatchReturnKey
(
mName
,
this
);
mDescription
=
new
QLineEdit
(
this
);
mDescription
->
setObjectName
(
QStringLiteral
(
"description"
));
mainLayout
->
addRow
(
i18n
(
"Description:"
),
mDescription
);
new
KPIM
::
LineEditCatchReturnKey
(
mDescription
,
this
);
mCommandLine
=
new
QLineEdit
(
this
);
mCommandLine
->
setClearButtonEnabled
(
true
);
mCommandLine
->
setObjectName
(
QStringLiteral
(
"commandline"
));
mCommandLine
->
setPlaceholderText
(
i18n
(
"Add command arguments..."
));
...
...
@@ -59,7 +60,6 @@ ViewerPluginExternalEditWidget::ViewerPluginExternalEditWidget(QWidget *parent)
mainLayout
->
addWidget
(
formatHelp
);
mExecutable
=
new
KUrlRequester
(
this
);
mExecutable
->
setObjectName
(
QStringLiteral
(
"mEditorRequester"
));
mExecutable
->
setMimeTypeFilters
(
...
...
plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.h
View file @
329f63a7
...
...
@@ -32,9 +32,9 @@ private:
ViewerPluginExternalScriptInfo
mScriptInfo
;
QStringList
mExistingsNames
;
QString
mCommandWhatsThis
;
QLineEdit
*
mName
=
nullptr
;
QLineEdit
*
mDescription
=
nullptr
;
QLineEdit
*
mCommandLine
=
nullptr
;
KUrlRequester
*
mExecutable
=
nullptr
;
QLineEdit
*
const
mName
;
QLineEdit
*
const
mDescription
;
QLineEdit
*
const
mCommandLine
;
KUrlRequester
*
const
mExecutable
;
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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