forked from qt-creator/qt-creator
Clean up.
Change-Id: I7f9c2d27fb4e38866443d066f5c8a4946aaa1b17 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -36,20 +36,14 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QSettings>
|
||||
#include <QtCore/QDirIterator>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
|
||||
using namespace Find;
|
||||
using namespace TextEditor;
|
||||
using namespace TextEditor::Internal;
|
||||
|
||||
FindInCurrentFile::FindInCurrentFile()
|
||||
: m_configWidget(0),
|
||||
m_currentFile(0)
|
||||
: m_currentFile(0)
|
||||
{
|
||||
connect(Core::ICore::instance()->editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)),
|
||||
this, SLOT(handleFileChange(Core::IEditor*)));
|
||||
@@ -116,22 +110,6 @@ void FindInCurrentFile::handleFileChange(Core::IEditor *editor)
|
||||
}
|
||||
|
||||
|
||||
QWidget *FindInCurrentFile::createConfigWidget()
|
||||
{
|
||||
if (!m_configWidget) {
|
||||
m_configWidget = new QWidget;
|
||||
QGridLayout * const gridLayout = new QGridLayout(m_configWidget);
|
||||
gridLayout->setMargin(0);
|
||||
m_configWidget->setLayout(gridLayout);
|
||||
// just for the layout HACK
|
||||
QLabel * const filePatternLabel = new QLabel;
|
||||
filePatternLabel->setMinimumWidth(80);
|
||||
filePatternLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
|
||||
gridLayout->addWidget(filePatternLabel, 0, 0);
|
||||
}
|
||||
return m_configWidget;
|
||||
}
|
||||
|
||||
void FindInCurrentFile::writeSettings(QSettings *settings)
|
||||
{
|
||||
settings->beginGroup(QLatin1String("FindInCurrentFile"));
|
||||
@@ -142,6 +120,6 @@ void FindInCurrentFile::writeSettings(QSettings *settings)
|
||||
void FindInCurrentFile::readSettings(QSettings *settings)
|
||||
{
|
||||
settings->beginGroup(QLatin1String("FindInCurrentFile"));
|
||||
readCommonSettings(settings, QLatin1String("*.cpp,*.h"));
|
||||
readCommonSettings(settings, QLatin1String("*"));
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
@@ -37,13 +37,8 @@
|
||||
|
||||
#include <coreplugin/ifile.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <find/ifindfilter.h>
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QComboBox>
|
||||
#include <QtGui/QStringListModel>
|
||||
|
||||
|
||||
namespace TextEditor {
|
||||
namespace Internal {
|
||||
@@ -58,7 +53,6 @@ public:
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
bool isEnabled() const;
|
||||
QWidget *createConfigWidget();
|
||||
void writeSettings(QSettings *settings);
|
||||
void readSettings(QSettings *settings);
|
||||
|
||||
@@ -73,7 +67,6 @@ private slots:
|
||||
void handleFileChange(Core::IEditor *editor);
|
||||
|
||||
private:
|
||||
QPointer<QWidget> m_configWidget;
|
||||
QPointer<Core::IFile> m_currentFile;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user