mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kate: remove always null KateTemplateInfoWidget member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
defd167bcc
commit
b117de749a
2 changed files with 3 additions and 24 deletions
|
@ -505,9 +505,8 @@ void KateFileTemplates::slotEditTemplate()
|
|||
|
||||
//BEGIN KateTemplateInfoWidget
|
||||
// This widget can be used to change the data of a TemplateInfo object
|
||||
KateTemplateInfoWidget::KateTemplateInfoWidget( QWidget *parent, TemplateInfo *info, KateFileTemplates *kft )
|
||||
KateTemplateInfoWidget::KateTemplateInfoWidget( QWidget *parent, KateFileTemplates *kft )
|
||||
: QWidget( parent ),
|
||||
info( info ),
|
||||
kft( kft )
|
||||
{
|
||||
QGridLayout *lo = new QGridLayout( this );
|
||||
|
@ -565,24 +564,6 @@ KateTemplateInfoWidget::KateTemplateInfoWidget( QWidget *parent, TemplateInfo *i
|
|||
"<p>the recommended form is like an Email "
|
||||
"address: 'Anders Lund <anders@alweb.dk>'</p>") );
|
||||
|
||||
// if we have a object ! null
|
||||
if ( info )
|
||||
{
|
||||
if ( ! info->icon.isEmpty() )
|
||||
ibIcon->setIcon( info->icon );
|
||||
leTemplate->setText( info->tmplate );
|
||||
int i = cmbGroup->findText( info->group );
|
||||
if ( i != -1 ) {
|
||||
cmbGroup->setCurrentIndex( i );
|
||||
} else {
|
||||
cmbGroup->setEditText( info->group );
|
||||
}
|
||||
leDescription->setText( info->description );
|
||||
leAuthor->setText( info->author );
|
||||
if ( ! info->highlight.isEmpty() )
|
||||
btnHighlight->setText( info->highlight );
|
||||
}
|
||||
|
||||
// fill in the Hl menu
|
||||
KTextEditor::Document *doc = kft->application()->activeMainWindow()->activeView()->document();
|
||||
if ( doc )
|
||||
|
@ -697,7 +678,7 @@ KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft
|
|||
page->setTitle( i18n("Edit Template Properties") );
|
||||
page->setSubTitle( i18n("Specify the main properties of your plugin. You can leave fields empty for which you have no meaningful value.") );
|
||||
glo = new QGridLayout( page );
|
||||
kti = new KateTemplateInfoWidget( page, 0, kft );
|
||||
kti = new KateTemplateInfoWidget( page, kft );
|
||||
glo->addWidget( kti, 1, 1 );
|
||||
addPage( page );
|
||||
|
||||
|
|
|
@ -144,11 +144,9 @@ class KateTemplateInfoWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit KateTemplateInfoWidget( QWidget *parent=0, TemplateInfo *info=0, KateFileTemplates *kft=0 );
|
||||
explicit KateTemplateInfoWidget( QWidget *parent=0, KateFileTemplates *kft=0 );
|
||||
~KateTemplateInfoWidget() {}
|
||||
|
||||
TemplateInfo *info;
|
||||
|
||||
class KLineEdit *leTemplate, *leDocumentName, *leDescription, *leAuthor;
|
||||
class KComboBox *cmbGroup;
|
||||
QPushButton *btnHighlight;
|
||||
|
|
Loading…
Add table
Reference in a new issue