Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f4721eaa
Commit
f4721eaa
authored
Jan 26, 2009
by
hjk
Browse files
Fixes: coreplugin: remove 'fat' BaseView constructor
Details: failed trial before the committee on un-qtish behaviour
parent
62d78bb0
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/baseview.cpp
View file @
f4721eaa
...
...
@@ -82,29 +82,10 @@ BaseView::BaseView(QObject *parent)
{
}
/*!
\fn BaseView::BaseView(const char *name, QWidget *widget, const QList<int> &context, Qt::DockWidgetArea position, QObject *parent)
Creates a view with the given properties.
\a name
\a widget
\a context
\a position
\a parent
*/
BaseView
::
BaseView
(
const
char
*
name
,
QWidget
*
widget
,
const
QList
<
int
>
&
context
,
IView
::
ViewPosition
position
,
QObject
*
parent
)
:
IView
(
parent
),
m_viewName
(
name
),
m_widget
(
widget
),
m_context
(
context
),
m_defaultPosition
(
position
)
{
}
/*!
\fn BaseView::~BaseView()
Destructor also destroys the widget.
*/
BaseView
::~
BaseView
()
{
...
...
src/plugins/coreplugin/baseview.h
View file @
f4721eaa
...
...
@@ -40,14 +40,12 @@
namespace
Core
{
class
CORE_EXPORT
BaseView
:
public
IView
class
CORE_EXPORT
BaseView
:
public
IView
{
Q_OBJECT
public:
BaseView
(
QObject
*
parent
=
0
);
BaseView
(
const
char
*
name
,
QWidget
*
widget
,
const
QList
<
int
>
&
context
,
IView
::
ViewPosition
position
,
QObject
*
parent
=
0
);
~
BaseView
();
QList
<
int
>
context
()
const
;
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
f4721eaa
...
...
@@ -309,8 +309,10 @@ bool MainWindow::init(QString *errorMessage)
// Add widget to the bottom, we create the view here instead of inside the
// OutputPaneManager, since the ViewManager needs to be initilized before
m_outputView
=
new
Core
::
BaseView
(
"OutputWindow.Buttons"
,
OutputPaneManager
::
instance
()
->
buttonsWidget
(),
QList
<
int
>
(),
Core
::
IView
::
Second
);
m_outputView
=
new
Core
::
BaseView
;
m_outputView
->
setUniqueViewName
(
"OutputWindow.Buttons"
);
m_outputView
->
setWidget
(
OutputPaneManager
::
instance
()
->
buttonsWidget
());
m_outputView
->
setDefaultPosition
(
Core
::
IView
::
Second
);
pm
->
addObject
(
m_outputView
);
return
true
;
}
...
...
src/plugins/quickopen/quickopenplugin.cpp
View file @
f4721eaa
...
...
@@ -57,6 +57,7 @@
using
namespace
QuickOpen
;
using
namespace
QuickOpen
::
Internal
;
namespace
{
static
bool
filterLessThan
(
const
IQuickOpenFilter
*
first
,
const
IQuickOpenFilter
*
second
)
{
...
...
@@ -89,10 +90,12 @@ bool QuickOpenPlugin::initialize(const QStringList &, QString *)
m_quickOpenToolWindow
=
new
QuickOpenToolWindow
(
this
);
m_quickOpenToolWindow
->
setEnabled
(
false
);
Core
::
BaseView
*
view
=
new
Core
::
BaseView
(
"QuickOpen.ToolWindow"
,
m_quickOpenToolWindow
,
QList
<
int
>
()
<<
core
->
uniqueIDManager
()
->
uniqueIdentifier
(
QLatin1String
(
"QuickOpenToolWindow"
)),
Core
::
IView
::
First
);
Core
::
BaseView
*
view
=
new
Core
::
BaseView
;
view
->
setUniqueViewName
(
"QuickOpen.ToolWindow"
);
view
->
setWidget
(
m_quickOpenToolWindow
);
view
->
setContext
(
QList
<
int
>
()
<<
core
->
uniqueIDManager
()
->
uniqueIdentifier
(
QLatin1String
(
"QuickOpenToolWindow"
)));
view
->
setDefaultPosition
(
Core
::
IView
::
First
);
addAutoReleasedObject
(
view
);
const
QString
actionId
=
QLatin1String
(
"QtCreator.View.QuickOpen.ToolWindow"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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