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
Tobias Hunger
qt-creator
Commits
3b92aab2
Commit
3b92aab2
authored
Jan 06, 2011
by
hjk
Browse files
classview: minor cleanup
parent
a7098c69
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/classview/classviewmanager.cpp
View file @
3b92aab2
...
@@ -85,9 +85,6 @@ struct ManagerPrivate
...
@@ -85,9 +85,6 @@ struct ManagerPrivate
//! separate thread for the parser
//! separate thread for the parser
QThread
parserThread
;
QThread
parserThread
;
//! cpp code model manager
QPointer
<
CPlusPlus
::
CppModelManagerInterface
>
codeModelManager
;
//! there is some massive operation ongoing so temporary we should wait
//! there is some massive operation ongoing so temporary we should wait
bool
disableCodeParser
;
bool
disableCodeParser
;
};
};
...
@@ -166,21 +163,10 @@ void Manager::initialize()
...
@@ -166,21 +163,10 @@ void Manager::initialize()
connect
(
core
->
progressManager
(),
SIGNAL
(
allTasksFinished
(
QString
)),
connect
(
core
->
progressManager
(),
SIGNAL
(
allTasksFinished
(
QString
)),
SLOT
(
onAllTasksFinished
(
QString
)),
Qt
::
QueuedConnection
);
SLOT
(
onAllTasksFinished
(
QString
)),
Qt
::
QueuedConnection
);
// connect to the cpp model manager for signals about document updates
d_ptr
->
codeModelManager
=
CPlusPlus
::
CppModelManagerInterface
::
instance
();
// when code manager signals that document is updated - handle it by ourselves
connect
(
d_ptr
->
codeModelManager
,
SIGNAL
(
documentUpdated
(
CPlusPlus
::
Document
::
Ptr
)),
SLOT
(
onDocumentUpdated
(
CPlusPlus
::
Document
::
Ptr
)),
Qt
::
QueuedConnection
);
// when we signals that really document is updated - sent it to the parser
// when we signals that really document is updated - sent it to the parser
connect
(
this
,
SIGNAL
(
requestDocumentUpdated
(
CPlusPlus
::
Document
::
Ptr
)),
connect
(
this
,
SIGNAL
(
requestDocumentUpdated
(
CPlusPlus
::
Document
::
Ptr
)),
&
d_ptr
->
parser
,
SLOT
(
parseDocument
(
CPlusPlus
::
Document
::
Ptr
)),
Qt
::
QueuedConnection
);
&
d_ptr
->
parser
,
SLOT
(
parseDocument
(
CPlusPlus
::
Document
::
Ptr
)),
Qt
::
QueuedConnection
);
//
connect
(
d_ptr
->
codeModelManager
,
SIGNAL
(
aboutToRemoveFiles
(
QStringList
)),
&
d_ptr
->
parser
,
SLOT
(
removeFiles
(
QStringList
)),
Qt
::
QueuedConnection
);
// translate data update from the parser to listeners
// translate data update from the parser to listeners
connect
(
&
d_ptr
->
parser
,
SIGNAL
(
treeDataUpdate
(
QSharedPointer
<
QStandardItem
>
)),
connect
(
&
d_ptr
->
parser
,
SIGNAL
(
treeDataUpdate
(
QSharedPointer
<
QStandardItem
>
)),
this
,
SLOT
(
onTreeDataUpdate
(
QSharedPointer
<
QStandardItem
>
)),
Qt
::
QueuedConnection
);
this
,
SLOT
(
onTreeDataUpdate
(
QSharedPointer
<
QStandardItem
>
)),
Qt
::
QueuedConnection
);
...
@@ -204,6 +190,17 @@ void Manager::initialize()
...
@@ -204,6 +190,17 @@ void Manager::initialize()
// flat mode request
// flat mode request
connect
(
this
,
SIGNAL
(
requestSetFlatMode
(
bool
)),
connect
(
this
,
SIGNAL
(
requestSetFlatMode
(
bool
)),
&
d_ptr
->
parser
,
SLOT
(
setFlatMode
(
bool
)),
Qt
::
QueuedConnection
);
&
d_ptr
->
parser
,
SLOT
(
setFlatMode
(
bool
)),
Qt
::
QueuedConnection
);
// connect to the cpp model manager for signals about document updates
CPlusPlus
::
CppModelManagerInterface
*
codeModelManager
=
CPlusPlus
::
CppModelManagerInterface
::
instance
();
// when code manager signals that document is updated - handle it by ourselves
connect
(
codeModelManager
,
SIGNAL
(
documentUpdated
(
CPlusPlus
::
Document
::
Ptr
)),
SLOT
(
onDocumentUpdated
(
CPlusPlus
::
Document
::
Ptr
)),
Qt
::
QueuedConnection
);
//
connect
(
codeModelManager
,
SIGNAL
(
aboutToRemoveFiles
(
QStringList
)),
&
d_ptr
->
parser
,
SLOT
(
removeFiles
(
QStringList
)),
Qt
::
QueuedConnection
);
}
}
bool
Manager
::
state
()
const
bool
Manager
::
state
()
const
...
...
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