Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
4827d3aa
Commit
4827d3aa
authored
Mar 18, 2011
by
dt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 Maemo: Simplfy code for adding OTHER_FILES to .pro file
Task-Nr: QTCREATORBUG-4085
parent
edcfe082
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
4 deletions
+29
-4
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+6
-1
src/plugins/projectexplorer/projectexplorer.h
src/plugins/projectexplorer/projectexplorer.h
+2
-0
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
+17
-3
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
+1
-0
src/plugins/qt4projectmanager/qt4project.cpp
src/plugins/qt4projectmanager/qt4project.cpp
+2
-0
src/plugins/qt4projectmanager/qt4project.h
src/plugins/qt4projectmanager/qt4project.h
+1
-0
No files found.
src/plugins/projectexplorer/projectexplorer.cpp
View file @
4827d3aa
...
...
@@ -2267,8 +2267,13 @@ void ProjectExplorerPlugin::addExistingFiles()
void
ProjectExplorerPlugin
::
addExistingFiles
(
const
QStringList
&
filePaths
)
{
ProjectNode
*
projectNode
=
qobject_cast
<
ProjectNode
*>
(
d
->
m_currentNode
->
projectNode
());
addExistingFiles
(
projectNode
,
filePaths
);
}
void
ProjectExplorerPlugin
::
addExistingFiles
(
ProjectNode
*
projectNode
,
const
QStringList
&
filePaths
)
{
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
const
QString
dir
=
directoryFor
(
d
->
m_curren
tNode
);
const
QString
dir
=
directoryFor
(
projec
tNode
);
QStringList
fileNames
=
filePaths
;
QHash
<
FileType
,
QString
>
fileTypeToFiles
;
foreach
(
const
QString
&
fileName
,
fileNames
)
{
...
...
src/plugins/projectexplorer/projectexplorer.h
View file @
4827d3aa
...
...
@@ -61,6 +61,7 @@ class IRunControlFactory;
class
Project
;
class
Node
;
class
BuildConfiguration
;
class
ProjectNode
;
namespace
Internal
{
class
ProjectFileFactory
;
...
...
@@ -120,6 +121,7 @@ public:
void
runProject
(
Project
*
pro
,
const
QString
&
mode
);
void
runRunConfiguration
(
ProjectExplorer
::
RunConfiguration
*
rc
,
const
QString
&
mode
);
void
addExistingFiles
(
ProjectExplorer
::
ProjectNode
*
projectNode
,
const
QStringList
&
filePaths
);
void
addExistingFiles
(
const
QStringList
&
filePaths
);
signals:
...
...
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
View file @
4827d3aa
...
...
@@ -115,8 +115,9 @@ AbstractQt4MaemoTarget::AbstractQt4MaemoTarget(Qt4Project *parent, const QString
{
setIcon
(
QIcon
(
":/projectexplorer/images/MaemoDevice.png"
));
connect
(
parent
,
SIGNAL
(
addedTarget
(
ProjectExplorer
::
Target
*
)),
this
,
SLOT
(
handleTargetAdded
(
ProjectExplorer
::
Target
*
)),
Qt
::
QueuedConnection
);
// Otherwise ProjextExplorerPlugin::addExistingFiles() won't be ready.
this
,
SLOT
(
handleTargetAdded
(
ProjectExplorer
::
Target
*
)));
connect
(
parent
,
SIGNAL
(
fromMapFinished
()),
this
,
SLOT
(
handleFromMapFinished
()));
}
AbstractQt4MaemoTarget
::~
AbstractQt4MaemoTarget
()
...
...
@@ -273,11 +274,24 @@ QSharedPointer<QFile> AbstractQt4MaemoTarget::openFile(const QString &filePath,
return
file
;
}
void
AbstractQt4MaemoTarget
::
handleFromMapFinished
()
{
handleTargetAdded
(
this
);
}
void
AbstractQt4MaemoTarget
::
handleTargetAdded
(
ProjectExplorer
::
Target
*
target
)
{
if
(
target
!=
this
)
return
;
if
(
!
project
()
->
rootProjectNode
())
{
// Project is not fully setup yet, happens on new project
// we wait for the fromMapFinished that comes afterwards
return
;
}
disconnect
(
project
(),
SIGNAL
(
fromMapFinished
()),
this
,
SLOT
(
handleFromMapFinished
()));
disconnect
(
project
(),
SIGNAL
(
addedTarget
(
ProjectExplorer
::
Target
*
)),
this
,
SLOT
(
handleTargetAdded
(
ProjectExplorer
::
Target
*
)));
connect
(
project
(),
SIGNAL
(
aboutToRemoveTarget
(
ProjectExplorer
::
Target
*
)),
...
...
@@ -346,7 +360,7 @@ AbstractQt4MaemoTarget::ActionStatus AbstractQt4MaemoTarget::createTemplates()
.
arg
(
files
.
join
(
QLatin1String
(
"
\n
"
))),
QMessageBox
::
Yes
|
QMessageBox
::
No
);
if
(
button
==
QMessageBox
::
Yes
)
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
()
->
addExistingFiles
(
files
);
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
()
->
addExistingFiles
(
project
()
->
rootProjectNode
(),
files
);
}
return
actionStatus
;
}
...
...
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
View file @
4827d3aa
...
...
@@ -104,6 +104,7 @@ protected:
private
slots
:
void
handleTargetAdded
(
ProjectExplorer
::
Target
*
target
);
void
handleFromMapFinished
();
void
handleTargetToBeRemoved
(
ProjectExplorer
::
Target
*
target
);
private:
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
4827d3aa
...
...
@@ -348,6 +348,8 @@ bool Qt4Project::fromMap(const QVariantMap &map)
connect
(
this
,
SIGNAL
(
activeTargetChanged
(
ProjectExplorer
::
Target
*
)),
this
,
SLOT
(
activeTargetWasChanged
()));
emit
fromMapFinished
();
return
true
;
}
...
...
src/plugins/qt4projectmanager/qt4project.h
View file @
4827d3aa
...
...
@@ -191,6 +191,7 @@ signals:
void
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
node
,
bool
);
void
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
node
);
void
buildDirectoryInitialized
();
void
fromMapFinished
();
public
slots
:
void
proFileParseError
(
const
QString
&
errorMessage
);
...
...
Write
Preview
Markdown
is supported
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