Skip to content
GitLab
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
1ffd0bbf
Commit
1ffd0bbf
authored
Jul 27, 2009
by
dt
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
f90e3715
d5c7bf1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
1ffd0bbf
...
...
@@ -121,11 +121,6 @@ QtVersionManager::QtVersionManager()
writeVersionsIntoSettings
();
if
(
Welcome
::
WelcomeMode
*
welcomeMode
=
qobject_cast
<
Welcome
::
WelcomeMode
*>
(
Core
::
ICore
::
instance
()
->
modeManager
()
->
mode
(
Core
::
Constants
::
MODE_WELCOME
)))
{
connect
(
this
,
SIGNAL
(
updatedExamples
(
QString
,
QString
)),
welcomeMode
,
SIGNAL
(
updatedExamples
(
QString
,
QString
)));
}
updateDocumentation
();
updateExamples
();
}
...
...
@@ -190,7 +185,9 @@ void QtVersionManager::updateExamples()
if
(
version
->
hasDemos
())
demosPath
=
version
->
demosPath
();
if
(
!
examplesPath
.
isEmpty
()
&&
!
demosPath
.
isEmpty
())
{
emit
updatedExamples
(
examplesPath
,
demosPath
);
if
(
Welcome
::
WelcomeMode
*
welcomeMode
=
qobject_cast
<
Welcome
::
WelcomeMode
*>
(
Core
::
ICore
::
instance
()
->
modeManager
()
->
mode
(
Core
::
Constants
::
MODE_WELCOME
)))
welcomeMode
->
updateExamples
(
examplesPath
,
demosPath
,
version
->
sourcePath
());
return
;
}
}
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
1ffd0bbf
...
...
@@ -201,7 +201,6 @@ public:
signals:
void
defaultQtVersionChanged
();
void
qtVersionsChanged
();
void
updatedExamples
(
const
QString
&
examplesPath
,
const
QString
&
demosPath
);
private:
static
QString
findQMakeLine
(
const
QString
&
directory
);
static
QString
trimLine
(
const
QString
line
);
...
...
src/plugins/welcome/welcomemode.cpp
View file @
1ffd0bbf
...
...
@@ -169,9 +169,6 @@ WelcomeMode::WelcomeMode() :
connect
(
m_d
->
ui
.
openExampleButton
,
SIGNAL
(
clicked
()),
SLOT
(
slotOpenExample
()));
connect
(
m_d
->
ui
.
examplesComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
SLOT
(
slotEnableExampleButton
(
int
)));
connect
(
this
,
SIGNAL
(
updatedExamples
(
QString
,
QString
)),
this
,
SLOT
(
slotUpdateExamples
(
QString
,
QString
)));
connect
(
m_d
->
rssFetcher
,
SIGNAL
(
newsItemReady
(
QString
,
QString
,
QString
)),
m_d
->
ui
.
newsTreeWidget
,
SLOT
(
slotAddNewsItem
(
QString
,
QString
,
QString
)));
...
...
@@ -315,11 +312,14 @@ void WelcomeMode::slotUrlClicked(const QString &data)
QDesktopServices
::
openUrl
(
QUrl
(
data
));
}
void
WelcomeMode
::
slotU
pdateExamples
(
const
QString
&
examplePath
,
const
QString
&
demosPath
)
void
WelcomeMode
::
u
pdateExamples
(
const
QString
&
examplePath
,
const
QString
&
demosPath
,
const
QString
&
sourcePath
)
{
QString
demoxml
=
demosPath
+
"/qtdemo/xml/examples.xml"
;
if
(
!
QFile
::
exists
(
demoxml
))
return
;
if
(
!
QFile
::
exists
(
demoxml
))
{
demoxml
=
sourcePath
+
"/demos/qtdemo/xml/examples.xml"
;
if
(
!
QFile
::
exists
(
demoxml
))
return
;
}
QFile
description
(
demoxml
);
if
(
!
description
.
open
(
QFile
::
ReadOnly
))
...
...
@@ -353,7 +353,10 @@ void WelcomeMode::slotUpdateExamples(const QString& examplePath, const QString&
if
(
inExamples
&&
reader
.
name
()
==
"example"
)
{
QString
name
=
reader
.
attributes
().
value
(
QLatin1String
(
"name"
)).
toString
();
QString
fn
=
reader
.
attributes
().
value
(
QLatin1String
(
"filename"
)).
toString
();
QString
fileName
=
examplePath
+
'/'
+
dirName
+
'/'
+
fn
+
'/'
+
fn
+
".pro"
;
QString
relativeProPath
=
'/'
+
dirName
+
'/'
+
fn
+
'/'
+
fn
+
".pro"
;
QString
fileName
=
examplePath
+
relativeProPath
;
if
(
!
QFile
::
exists
(
fileName
))
fileName
=
sourcePath
+
"/examples"
+
relativeProPath
;
QString
helpPath
=
"qthelp://com.trolltech.qt/qdoc/"
+
dirName
.
replace
(
"/"
,
"-"
)
+
"-"
+
fn
+
".html"
;
m_d
->
ui
.
examplesComboBox
->
addItem
(
" "
+
name
,
fileName
);
...
...
src/plugins/welcome/welcomemode.h
View file @
1ffd0bbf
...
...
@@ -76,20 +76,20 @@ public:
void
activated
();
QString
contextHelpId
()
const
{
return
QLatin1String
(
"Qt Creator"
);
}
void
updateExamples
(
const
QString
&
examplePath
,
const
QString
&
demosPath
,
const
QString
&
sourcePath
);
signals:
void
requestProject
(
const
QString
&
project
);
void
requestSession
(
const
QString
&
session
);
void
openHelpPage
(
const
QString
&
url
);
void
openContextHelpPage
(
const
QString
&
url
);
void
manageSessions
();
void
updatedExamples
(
const
QString
&
examplePath
,
const
QString
&
demosPath
);
private
slots
:
void
slotFeedback
();
void
slotSessionClicked
(
const
QString
&
data
);
void
slotProjectClicked
(
const
QString
&
data
);
void
slotUrlClicked
(
const
QString
&
data
);
void
slotUpdateExamples
(
const
QString
&
examplePath
,
const
QString
&
demosPath
);
void
slotEnableExampleButton
(
int
);
void
slotOpenExample
();
void
slotCreateNewProject
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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