mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
keditfiletype: remove bits for always false condition
the iconLabel member is always null Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0d32557a65
commit
23479d802a
2 changed files with 24 additions and 29 deletions
|
@ -69,7 +69,6 @@ FileTypeDetails::FileTypeDetails( QWidget * parent )
|
|||
iconButton->setWhatsThis( i18n("This button displays the icon associated"
|
||||
" with the selected file type. Click on it to choose a different icon.") );
|
||||
iconButton->setFixedSize(70, 70);
|
||||
iconLabel = 0;
|
||||
hBox->addWidget(iconButton);
|
||||
|
||||
QGroupBox *gb = new QGroupBox(i18n("Filename Patterns"), firstWidget);
|
||||
|
@ -321,10 +320,7 @@ void FileTypeDetails::setMimeTypeData( MimeTypeData * mimeTypeData, TypesListIte
|
|||
m_item = item; // can be 0
|
||||
Q_ASSERT(mimeTypeData);
|
||||
m_mimeTypeLabel->setText(i18n("File type %1", mimeTypeData->name()));
|
||||
if (iconButton)
|
||||
iconButton->setIcon(mimeTypeData->icon());
|
||||
else
|
||||
iconLabel->setPixmap(DesktopIcon(mimeTypeData->icon()));
|
||||
iconButton->setIcon(mimeTypeData->icon());
|
||||
description->setText(mimeTypeData->comment());
|
||||
m_rbGroupSettings->setText( i18n("Use settings for '%1' group", mimeTypeData->majorType() ) );
|
||||
extensionLB->clear();
|
||||
|
|
|
@ -43,9 +43,9 @@ class KServiceListWidget;
|
|||
*/
|
||||
class FileTypeDetails : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
FileTypeDetails(QWidget *parent = 0);
|
||||
FileTypeDetails(QWidget *parent = 0);
|
||||
|
||||
/**
|
||||
* Set a non-gui "mimetype data" to work on,
|
||||
|
@ -59,21 +59,21 @@ public:
|
|||
void refresh();
|
||||
|
||||
protected:
|
||||
void updateRemoveButton();
|
||||
void updateAskSave();
|
||||
void updateRemoveButton();
|
||||
void updateAskSave();
|
||||
|
||||
Q_SIGNALS:
|
||||
void embedMajor(const QString &major, bool &embed); // To adjust whether major type is being embedded
|
||||
void changed(bool);
|
||||
void embedMajor(const QString &major, bool &embed); // To adjust whether major type is being embedded
|
||||
void changed(bool);
|
||||
|
||||
protected Q_SLOTS:
|
||||
void updateIcon(const QString &icon);
|
||||
void updateDescription(const QString &desc);
|
||||
void addExtension();
|
||||
void removeExtension();
|
||||
void enableExtButtons();
|
||||
void slotAutoEmbedClicked(int button);
|
||||
void slotAskSaveToggled(bool);
|
||||
void updateIcon(const QString &icon);
|
||||
void updateDescription(const QString &desc);
|
||||
void addExtension();
|
||||
void removeExtension();
|
||||
void enableExtButtons();
|
||||
void slotAutoEmbedClicked(int button);
|
||||
void slotAskSaveToggled(bool);
|
||||
|
||||
private:
|
||||
MimeTypeData* m_mimeTypeData;
|
||||
|
@ -85,19 +85,18 @@ private:
|
|||
|
||||
// First tab - General
|
||||
KIconButton* iconButton;
|
||||
QLabel* iconLabel; // if icon cannot be changed
|
||||
|
||||
QListWidget *extensionLB;
|
||||
KPushButton *addExtButton, *removeExtButton;
|
||||
KLineEdit *description;
|
||||
KServiceListWidget *serviceListWidget;
|
||||
QListWidget *extensionLB;
|
||||
KPushButton *addExtButton, *removeExtButton;
|
||||
KLineEdit *description;
|
||||
KServiceListWidget *serviceListWidget;
|
||||
|
||||
// Second tab - Embedding
|
||||
QGroupBox *m_autoEmbedBox;
|
||||
QButtonGroup *m_autoEmbedGroup;
|
||||
KServiceListWidget *embedServiceListWidget;
|
||||
QCheckBox *m_chkAskSave;
|
||||
QRadioButton *m_rbGroupSettings;
|
||||
// Second tab - Embedding
|
||||
QGroupBox *m_autoEmbedBox;
|
||||
QButtonGroup *m_autoEmbedGroup;
|
||||
KServiceListWidget *embedServiceListWidget;
|
||||
QCheckBox *m_chkAskSave;
|
||||
QRadioButton *m_rbGroupSettings;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue