utils: base PathChooser on FancyLineEdit

Change-Id: Ibf5e7ca866dca0816efda9f75af2cd17ac61c7c7
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
hjk
2012-08-23 13:55:11 +02:00
parent 5ff302d87d
commit ec6929434d
4 changed files with 6 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ BaseValidatingLineEditPrivate::BaseValidatingLineEditPrivate(const QWidget *w) :
} }
BaseValidatingLineEdit::BaseValidatingLineEdit(QWidget *parent) : BaseValidatingLineEdit::BaseValidatingLineEdit(QWidget *parent) :
QLineEdit(parent), FancyLineEdit(parent),
m_bd(new BaseValidatingLineEditPrivate(this)) m_bd(new BaseValidatingLineEditPrivate(this))
{ {
// Note that textChanged() is also triggered automagically by // Note that textChanged() is also triggered automagically by

View File

@@ -33,13 +33,13 @@
#include "utils_global.h" #include "utils_global.h"
#include <QLineEdit> #include "fancylineedit.h"
namespace Utils { namespace Utils {
struct BaseValidatingLineEditPrivate; struct BaseValidatingLineEditPrivate;
class QTCREATOR_UTILS_EXPORT BaseValidatingLineEdit : public QLineEdit class QTCREATOR_UTILS_EXPORT BaseValidatingLineEdit : public FancyLineEdit
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString initialText READ initialText WRITE setInitialText DESIGNABLE true) Q_PROPERTY(QString initialText READ initialText WRITE setInitialText DESIGNABLE true)

View File

@@ -598,7 +598,7 @@ QString PathChooser::makeDialogTitle(const QString &title)
return d->m_dialogTitleOverride; return d->m_dialogTitleOverride;
} }
QLineEdit *PathChooser::lineEdit() const FancyLineEdit *PathChooser::lineEdit() const
{ {
// HACK: Make it work with HistoryCompleter. // HACK: Make it work with HistoryCompleter.
if (d->m_lineEdit->objectName().isEmpty()) if (d->m_lineEdit->objectName().isEmpty())

View File

@@ -34,6 +34,7 @@
#include "utils_global.h" #include "utils_global.h"
#include "fileutils.h" #include "fileutils.h"
#include "fancylineedit.h"
#include <QWidget> #include <QWidget>
@@ -115,7 +116,7 @@ public:
void insertButton(int index, const QString &text, QObject *receiver, const char *slotFunc); void insertButton(int index, const QString &text, QObject *receiver, const char *slotFunc);
QAbstractButton *buttonAtIndex(int index) const; QAbstractButton *buttonAtIndex(int index) const;
QLineEdit *lineEdit() const; FancyLineEdit *lineEdit() const;
// For PathChoosers of 'Command' type, this property specifies the arguments // For PathChoosers of 'Command' type, this property specifies the arguments
// required to obtain the tool version (commonly, '--version'). Setting them // required to obtain the tool version (commonly, '--version'). Setting them