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
d797eb43
Commit
d797eb43
authored
Jan 07, 2010
by
Kai Koehne
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of scm.dev.nokia.troll.no:creator/mainline into mainline_master
parents
818a7b22
b4969672
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
614 additions
and
275 deletions
+614
-275
src/plugins/cvs/cvseditor.cpp
src/plugins/cvs/cvseditor.cpp
+2
-2
src/plugins/cvs/cvseditor.h
src/plugins/cvs/cvseditor.h
+1
-1
src/plugins/cvs/cvsplugin.cpp
src/plugins/cvs/cvsplugin.cpp
+42
-5
src/plugins/cvs/cvsplugin.h
src/plugins/cvs/cvsplugin.h
+7
-1
src/plugins/perforce/perforceeditor.cpp
src/plugins/perforce/perforceeditor.cpp
+2
-2
src/plugins/perforce/perforceeditor.h
src/plugins/perforce/perforceeditor.h
+1
-1
src/plugins/perforce/perforceplugin.cpp
src/plugins/perforce/perforceplugin.cpp
+52
-9
src/plugins/perforce/perforceplugin.h
src/plugins/perforce/perforceplugin.h
+6
-1
src/plugins/perforce/perforcesettings.cpp
src/plugins/perforce/perforcesettings.cpp
+6
-1
src/plugins/perforce/perforcesettings.h
src/plugins/perforce/perforcesettings.h
+3
-0
src/plugins/perforce/settingspage.cpp
src/plugins/perforce/settingspage.cpp
+2
-0
src/plugins/perforce/settingspage.ui
src/plugins/perforce/settingspage.ui
+26
-9
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
...gins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
+6
-160
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
...lugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
+14
-11
src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
...t4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
+165
-0
src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.h
.../qt4projectmanager/qt-maemo/maemorunconfigurationwidget.h
+85
-0
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
+4
-0
src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri
src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri
+8
-5
src/plugins/subversion/settingspage.cpp
src/plugins/subversion/settingspage.cpp
+2
-0
src/plugins/subversion/settingspage.ui
src/plugins/subversion/settingspage.ui
+26
-17
src/plugins/subversion/subversioneditor.cpp
src/plugins/subversion/subversioneditor.cpp
+2
-2
src/plugins/subversion/subversioneditor.h
src/plugins/subversion/subversioneditor.h
+1
-1
src/plugins/subversion/subversionplugin.cpp
src/plugins/subversion/subversionplugin.cpp
+44
-4
src/plugins/subversion/subversionplugin.h
src/plugins/subversion/subversionplugin.h
+7
-2
src/plugins/subversion/subversionsettings.cpp
src/plugins/subversion/subversionsettings.cpp
+6
-1
src/plugins/subversion/subversionsettings.h
src/plugins/subversion/subversionsettings.h
+1
-0
src/plugins/vcsbase/vcsbaseeditor.cpp
src/plugins/vcsbase/vcsbaseeditor.cpp
+70
-31
src/plugins/vcsbase/vcsbaseeditor.h
src/plugins/vcsbase/vcsbaseeditor.h
+23
-9
No files found.
src/plugins/cvs/cvseditor.cpp
View file @
d797eb43
...
...
@@ -54,6 +54,7 @@ CVSEditor::CVSEditor(const VCSBase::VCSBaseEditorParameters *type,
{
QTC_ASSERT
(
m_revisionAnnotationPattern
.
isValid
(),
return
);
QTC_ASSERT
(
m_revisionLogPattern
.
isValid
(),
return
);
setAnnotateRevisionTextFormat
(
tr
(
"Annotate revision
\"
%1
\"
"
));
}
QSet
<
QString
>
CVSEditor
::
annotationChanges
()
const
...
...
@@ -149,11 +150,10 @@ QString CVSEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) cons
return
QString
();
}
QStringList
CVSEditor
::
annotationPreviousVersions
(
const
QString
&
revision
,
QString
*
actionTextFormat
)
const
QStringList
CVSEditor
::
annotationPreviousVersions
(
const
QString
&
revision
)
const
{
if
(
isFirstRevision
(
revision
))
return
QStringList
();
*
actionTextFormat
=
tr
(
"Annotate revision
\"
%1
\"
"
);
return
QStringList
(
previousRevision
(
revision
));
}
...
...
src/plugins/cvs/cvseditor.h
View file @
d797eb43
...
...
@@ -51,7 +51,7 @@ private:
virtual
VCSBase
::
DiffHighlighter
*
createDiffHighlighter
()
const
;
virtual
VCSBase
::
BaseAnnotationHighlighter
*
createAnnotationHighlighter
(
const
QSet
<
QString
>
&
changes
)
const
;
virtual
QString
fileNameFromDiffSpecification
(
const
QTextBlock
&
diffFileName
)
const
;
virtual
QStringList
annotationPreviousVersions
(
const
QString
&
revision
,
QString
*
actionTextFormat
)
const
;
virtual
QStringList
annotationPreviousVersions
(
const
QString
&
revision
)
const
;
const
QRegExp
m_revisionAnnotationPattern
;
const
QRegExp
m_revisionLogPattern
;
...
...
src/plugins/cvs/cvsplugin.cpp
View file @
d797eb43
...
...
@@ -95,6 +95,9 @@ static const char * const CMD_ID_ANNOTATE_CURRENT = "CVS.AnnotateCurrent";
static
const
char
*
const
CMD_ID_SEPARATOR3
=
"CVS.Separator3"
;
static
const
char
*
const
CMD_ID_STATUS
=
"CVS.Status"
;
static
const
char
*
const
CMD_ID_UPDATE
=
"CVS.Update"
;
static
const
char
*
const
CMD_ID_PROJECTLOG
=
"CVS.ProjectLog"
;
static
const
char
*
const
CMD_ID_REPOSITORYLOG
=
"CVS.RepositoryLog"
;
static
const
char
*
const
CMD_ID_SEPARATOR4
=
"CVS.Separator4"
;
static
const
VCSBase
::
VCSBaseEditorParameters
editorParameters
[]
=
{
{
...
...
@@ -149,6 +152,8 @@ CVSPlugin::CVSPlugin() :
m_revertAction
(
0
),
m_diffProjectAction
(
0
),
m_diffCurrentAction
(
0
),
m_logProjectAction
(
0
),
m_logRepositoryAction
(
0
),
m_commitAllAction
(
0
),
m_commitCurrentAction
(
0
),
m_filelogCurrentAction
(
0
),
...
...
@@ -325,12 +330,24 @@ bool CVSPlugin::initialize(const QStringList & /*arguments */, QString *errorMes
connect
(
m_statusProjectAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
projectStatus
()));
cvsMenu
->
addAction
(
command
);
m_logProjectAction
=
new
Utils
::
ParameterAction
(
tr
(
"Log Project"
),
tr
(
"Log Project
\"
%1
\"
"
),
Utils
::
ParameterAction
::
EnabledWithParameter
,
this
);
command
=
ami
->
registerAction
(
m_logProjectAction
,
CMD_ID_PROJECTLOG
,
globalcontext
);
command
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
connect
(
m_logProjectAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
logProject
()));
cvsMenu
->
addAction
(
command
);
m_updateProjectAction
=
new
Utils
::
ParameterAction
(
tr
(
"Update Project"
),
tr
(
"Update Project
\"
%1
\"
"
),
Utils
::
ParameterAction
::
EnabledWithParameter
,
this
);
command
=
ami
->
registerAction
(
m_updateProjectAction
,
CMD_ID_UPDATE
,
globalcontext
);
command
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
connect
(
m_updateProjectAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
updateProject
()));
cvsMenu
->
addAction
(
command
);
cvsMenu
->
addAction
(
createSeparator
(
this
,
ami
,
CMD_ID_SEPARATOR4
,
globalcontext
));
m_logRepositoryAction
=
new
QAction
(
tr
(
"Repository Log"
),
this
);
command
=
ami
->
registerAction
(
m_logRepositoryAction
,
CMD_ID_REPOSITORYLOG
,
globalcontext
);
connect
(
m_logRepositoryAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
logRepository
()));
cvsMenu
->
addAction
(
command
);
// Actions of the submit editor
QList
<
int
>
cvscommitcontext
;
cvscommitcontext
<<
Core
::
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
CVSCOMMITEDITOR
);
...
...
@@ -475,6 +492,8 @@ void CVSPlugin::updateActions(VCSBase::VCSBasePlugin::ActionState as)
if
(
!
VCSBase
::
VCSBasePlugin
::
enableMenuAction
(
as
,
m_menuAction
))
return
;
m_logRepositoryAction
->
setEnabled
(
currentState
().
hasTopLevel
());
const
QString
currentFileName
=
currentState
().
currentFileName
();
m_addAction
->
setParameter
(
currentFileName
);
m_deleteAction
->
setParameter
(
currentFileName
);
...
...
@@ -488,6 +507,7 @@ void CVSPlugin::updateActions(VCSBase::VCSBasePlugin::ActionState as)
m_diffProjectAction
->
setParameter
(
currentProjectName
);
m_statusProjectAction
->
setParameter
(
currentProjectName
);
m_updateProjectAction
->
setParameter
(
currentProjectName
);
m_logProjectAction
->
setParameter
(
currentProjectName
);
m_commitAllAction
->
setEnabled
(
currentState
().
hasTopLevel
());
}
...
...
@@ -641,10 +661,26 @@ void CVSPlugin::filelogCurrentFile()
{
const
VCSBase
::
VCSBasePluginState
state
=
currentState
();
QTC_ASSERT
(
state
.
hasFile
(),
return
)
filelog
(
state
.
currentFileTopLevel
(),
QStringList
(
state
.
relativeCurrentFile
()));
filelog
(
state
.
currentFileTopLevel
(),
QStringList
(
state
.
relativeCurrentFile
())
,
true
);
}
void
CVSPlugin
::
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
files
)
void
CVSPlugin
::
logProject
()
{
const
VCSBase
::
VCSBasePluginState
state
=
currentState
();
QTC_ASSERT
(
state
.
hasProject
(),
return
)
filelog
(
state
.
currentProjectTopLevel
(),
state
.
relativeCurrentProject
());
}
void
CVSPlugin
::
logRepository
()
{
const
VCSBase
::
VCSBasePluginState
state
=
currentState
();
QTC_ASSERT
(
state
.
hasTopLevel
(),
return
)
filelog
(
state
.
topLevel
());
}
void
CVSPlugin
::
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
files
,
bool
enableAnnotationContextMenu
)
{
QTextCodec
*
codec
=
VCSBase
::
VCSBaseEditor
::
getCodec
(
workingDir
,
files
);
// no need for temp file
...
...
@@ -659,7 +695,6 @@ void CVSPlugin::filelog(const QString &workingDir, const QStringList &files)
// Re-use an existing view if possible to support
// the common usage pattern of continuously changing and diffing a file
if
(
Core
::
IEditor
*
editor
=
locateEditor
(
"logFileName"
,
id
))
{
editor
->
createNew
(
response
.
stdOut
);
Core
::
EditorManager
::
instance
()
->
activateEditor
(
editor
);
...
...
@@ -667,6 +702,8 @@ void CVSPlugin::filelog(const QString &workingDir, const QStringList &files)
const
QString
title
=
QString
::
fromLatin1
(
"cvs log %1"
).
arg
(
id
);
Core
::
IEditor
*
newEditor
=
showOutputInEditor
(
title
,
response
.
stdOut
,
VCSBase
::
LogOutput
,
source
,
codec
);
newEditor
->
setProperty
(
"logFileName"
,
id
);
if
(
enableAnnotationContextMenu
)
VCSBase
::
VCSBaseEditor
::
getVcsBaseEditor
(
newEditor
)
->
setFileLogAnnotateEnabled
(
true
);
}
}
...
...
@@ -726,8 +763,6 @@ void CVSPlugin::annotate(const QString &workingDir, const QString &file,
const
QString
title
=
QString
::
fromLatin1
(
"cvs annotate %1"
).
arg
(
id
);
Core
::
IEditor
*
newEditor
=
showOutputInEditor
(
title
,
response
.
stdOut
,
VCSBase
::
AnnotateOutput
,
source
,
codec
);
newEditor
->
setProperty
(
"annotateFileName"
,
id
);
connect
(
newEditor
,
SIGNAL
(
annotatePreviousRequested
(
QString
,
QString
,
int
)),
this
,
SLOT
(
annotateVersion
(
QString
,
QString
,
int
)));
VCSBase
::
VCSBaseEditor
::
gotoLineOfEditor
(
newEditor
,
lineNumber
);
}
}
...
...
@@ -992,6 +1027,8 @@ Core::IEditor * CVSPlugin::showOutputInEditor(const QString& title, const QStrin
qDebug
()
<<
"CVSPlugin::showOutputInEditor"
<<
title
<<
kind
<<
"source="
<<
source
<<
"Size= "
<<
output
.
size
()
<<
" Type="
<<
editorType
<<
debugCodec
(
codec
);
QString
s
=
title
;
Core
::
IEditor
*
editor
=
Core
::
EditorManager
::
instance
()
->
openEditorWithContents
(
kind
,
&
s
,
output
.
toLocal8Bit
());
connect
(
editor
,
SIGNAL
(
annotateRevisionRequested
(
QString
,
QString
,
int
)),
this
,
SLOT
(
annotateVersion
(
QString
,
QString
,
int
)));
CVSEditor
*
e
=
qobject_cast
<
CVSEditor
*>
(
editor
->
widget
());
if
(
!
e
)
return
0
;
...
...
src/plugins/cvs/cvsplugin.h
View file @
d797eb43
...
...
@@ -113,6 +113,8 @@ private slots:
void
updateProject
();
void
submitCurrentLog
();
void
diffCommitFiles
(
const
QStringList
&
);
void
logProject
();
void
logRepository
();
protected:
virtual
void
updateActions
(
VCSBase
::
VCSBasePlugin
::
ActionState
);
...
...
@@ -135,7 +137,9 @@ private:
bool
describe
(
const
QString
&
source
,
const
QString
&
changeNr
,
QString
*
errorMessage
);
bool
describe
(
const
QString
&
toplevel
,
const
QString
&
source
,
const
QString
&
changeNr
,
QString
*
errorMessage
);
bool
describe
(
const
QString
&
repository
,
QList
<
CVS_LogEntry
>
entries
,
QString
*
errorMessage
);
void
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
files
=
QStringList
());
void
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
files
=
QStringList
(),
bool
enableAnnotationContextMenu
=
false
);
bool
managesDirectory
(
const
QDir
&
directory
)
const
;
QString
findTopLevelForDirectoryI
(
const
QString
&
directory
)
const
;
void
startCommit
(
const
QString
&
workingDir
,
const
QStringList
&
files
=
QStringList
());
...
...
@@ -152,6 +156,8 @@ private:
Utils
::
ParameterAction
*
m_revertAction
;
Utils
::
ParameterAction
*
m_diffProjectAction
;
Utils
::
ParameterAction
*
m_diffCurrentAction
;
Utils
::
ParameterAction
*
m_logProjectAction
;
QAction
*
m_logRepositoryAction
;
QAction
*
m_commitAllAction
;
Utils
::
ParameterAction
*
m_commitCurrentAction
;
Utils
::
ParameterAction
*
m_filelogCurrentAction
;
...
...
src/plugins/perforce/perforceeditor.cpp
View file @
d797eb43
...
...
@@ -62,6 +62,7 @@ PerforceEditor::PerforceEditor(const VCSBase::VCSBaseEditorParameters *type,
m_plugin
(
PerforcePlugin
::
perforcePluginInstance
())
{
QTC_ASSERT
(
m_changeNumberPattern
.
isValid
(),
/**/
);
setAnnotateRevisionTextFormat
(
tr
(
"Annotate change list
\"
%1
\"
"
));
if
(
Perforce
::
Constants
::
debug
)
qDebug
()
<<
"PerforceEditor::PerforceEditor"
<<
type
->
type
<<
type
->
kind
;
}
...
...
@@ -154,13 +155,12 @@ QString PerforceEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock)
return
QString
();
}
QStringList
PerforceEditor
::
annotationPreviousVersions
(
const
QString
&
v
,
QString
*
actionTextFormat
)
const
QStringList
PerforceEditor
::
annotationPreviousVersions
(
const
QString
&
v
)
const
{
bool
ok
;
const
int
changeList
=
v
.
toInt
(
&
ok
);
if
(
!
ok
||
changeList
<
2
)
return
QStringList
();
*
actionTextFormat
=
tr
(
"Annotate change list
\"
%1
\"
"
);
return
QStringList
(
QString
::
number
(
changeList
-
1
));
}
...
...
src/plugins/perforce/perforceeditor.h
View file @
d797eb43
...
...
@@ -53,7 +53,7 @@ private:
virtual
VCSBase
::
DiffHighlighter
*
createDiffHighlighter
()
const
;
virtual
VCSBase
::
BaseAnnotationHighlighter
*
createAnnotationHighlighter
(
const
QSet
<
QString
>
&
changes
)
const
;
virtual
QString
fileNameFromDiffSpecification
(
const
QTextBlock
&
diffFileName
)
const
;
virtual
QStringList
annotationPreviousVersions
(
const
QString
&
v
,
QString
*
actionTextFormat
)
const
;
virtual
QStringList
annotationPreviousVersions
(
const
QString
&
v
)
const
;
const
QRegExp
m_changeNumberPattern
;
PerforcePlugin
*
m_plugin
;
...
...
src/plugins/perforce/perforceplugin.cpp
View file @
d797eb43
...
...
@@ -133,6 +133,8 @@ static const char * const CMD_ID_EDIT = "Perforce.Edit";
static
const
char
*
const
CMD_ID_ADD
=
"Perforce.Add"
;
static
const
char
*
const
CMD_ID_DELETE_FILE
=
"Perforce.Delete"
;
static
const
char
*
const
CMD_ID_OPENED
=
"Perforce.Opened"
;
static
const
char
*
const
CMD_ID_PROJECTLOG
=
"Perforce.ProjectLog"
;
static
const
char
*
const
CMD_ID_REPOSITORYLOG
=
"Perforce.RepositoryLog"
;
static
const
char
*
const
CMD_ID_REVERT
=
"Perforce.Revert"
;
static
const
char
*
const
CMD_ID_DIFF_CURRENT
=
"Perforce.DiffCurrent"
;
static
const
char
*
const
CMD_ID_DIFF_PROJECT
=
"Perforce.DiffProject"
;
...
...
@@ -152,6 +154,7 @@ static const char * const CMD_ID_UPDATEALL = "Perforce.UpdateAll";
static
const
char
*
const
CMD_ID_SEPARATOR1
=
"Perforce.Separator1"
;
static
const
char
*
const
CMD_ID_SEPARATOR2
=
"Perforce.Separator2"
;
static
const
char
*
const
CMD_ID_SEPARATOR3
=
"Perforce.Separator3"
;
static
const
char
*
const
CMD_ID_SEPARATOR4
=
"Perforce.Separator4"
;
////
// PerforcePlugin
...
...
@@ -188,6 +191,8 @@ PerforcePlugin::PerforcePlugin() :
m_annotateAction
(
0
),
m_filelogCurrentAction
(
0
),
m_filelogAction
(
0
),
m_logProjectAction
(
0
),
m_logRepositoryAction
(
0
),
m_submitCurrentLogAction
(
0
),
m_updateAllAction
(
0
),
m_submitActionTriggered
(
false
),
...
...
@@ -318,6 +323,12 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString * e
connect
(
m_openedAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
printOpenedFileList
()));
mperforce
->
addAction
(
command
);
m_logProjectAction
=
new
Utils
::
ParameterAction
(
tr
(
"Log Project Log"
),
tr
(
"Log Project
\"
%1
\"
"
),
Utils
::
ParameterAction
::
EnabledWithParameter
,
this
);
command
=
am
->
registerAction
(
m_logProjectAction
,
CMD_ID_PROJECTLOG
,
globalcontext
);
command
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
connect
(
m_logProjectAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
logProject
()));
mperforce
->
addAction
(
command
);
m_submitProjectAction
=
new
Utils
::
ParameterAction
(
tr
(
"Submit Project"
),
tr
(
"Submit Project
\"
%1
\"
"
),
Utils
::
ParameterAction
::
EnabledWithParameter
,
this
);
command
=
am
->
registerAction
(
m_submitProjectAction
,
CMD_ID_SUBMIT
,
globalcontext
);
command
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
...
...
@@ -385,6 +396,16 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString * e
connect
(
m_filelogAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
filelog
()));
mperforce
->
addAction
(
command
);
tmpaction
=
new
QAction
(
this
);
tmpaction
->
setSeparator
(
true
);
command
=
am
->
registerAction
(
tmpaction
,
QLatin1String
(
CMD_ID_SEPARATOR4
),
globalcontext
);
mperforce
->
addAction
(
command
);
m_logRepositoryAction
=
new
QAction
(
tr
(
"Repository Log"
),
this
);
command
=
am
->
registerAction
(
m_logRepositoryAction
,
CMD_ID_REPOSITORYLOG
,
globalcontext
);
connect
(
m_logRepositoryAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
logRepository
()));
mperforce
->
addAction
(
command
);
m_updateAllAction
=
new
QAction
(
tr
(
"Update All"
),
this
);
command
=
am
->
registerAction
(
m_updateAllAction
,
CMD_ID_UPDATEALL
,
globalcontext
);
connect
(
m_updateAllAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
updateAll
()));
...
...
@@ -715,8 +736,6 @@ void PerforcePlugin::annotate(const QString &workingDir,
Core
::
IEditor
*
ed
=
showOutputInEditor
(
tr
(
"p4 annotate %1"
).
arg
(
id
),
result
.
stdOut
,
VCSBase
::
AnnotateOutput
,
source
,
codec
);
connect
(
ed
,
SIGNAL
(
annotatePreviousRequested
(
QString
,
QString
,
int
)),
this
,
SLOT
(
annotateVersion
(
QString
,
QString
,
int
)));
VCSBase
::
VCSBaseEditor
::
gotoLineOfEditor
(
ed
,
lineNumber
);
}
}
...
...
@@ -725,7 +744,7 @@ void PerforcePlugin::filelogCurrentFile()
{
const
VCSBase
::
VCSBasePluginState
state
=
currentState
();
QTC_ASSERT
(
state
.
hasFile
(),
return
)
filelog
(
state
.
currentFileTopLevel
(),
QStringList
(
state
.
relativeCurrentFile
()));
filelog
(
state
.
currentFileTopLevel
(),
QStringList
(
state
.
relativeCurrentFile
())
,
true
);
}
void
PerforcePlugin
::
filelog
()
...
...
@@ -737,21 +756,40 @@ void PerforcePlugin::filelog()
}
}
void
PerforcePlugin
::
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
fileNames
)
void
PerforcePlugin
::
logProject
()
{
const
VCSBase
::
VCSBasePluginState
state
=
currentState
();
QTC_ASSERT
(
state
.
hasProject
(),
return
)
filelog
(
state
.
currentProjectTopLevel
(),
perforceRelativeFileArguments
(
state
.
relativeCurrentProject
()));
}
void
PerforcePlugin
::
logRepository
()
{
const
VCSBase
::
VCSBasePluginState
state
=
currentState
();
QTC_ASSERT
(
state
.
hasTopLevel
(),
return
)
filelog
(
state
.
topLevel
(),
perforceRelativeFileArguments
(
QStringList
()));
}
void
PerforcePlugin
::
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
fileNames
,
bool
enableAnnotationContextMenu
)
{
const
QString
id
=
VCSBase
::
VCSBaseEditor
::
getTitleId
(
workingDir
,
fileNames
);
QTextCodec
*
codec
=
VCSBase
::
VCSBaseEditor
::
getCodec
(
workingDir
,
fileNames
);
QStringList
args
;
args
<<
QLatin1String
(
"filelog"
)
<<
QLatin1String
(
"-li"
);
if
(
m_settings
.
logCount
()
>
0
)
args
<<
QLatin1String
(
"-m"
)
<<
QString
::
number
(
m_settings
.
logCount
());
args
.
append
(
fileNames
);
const
PerforceResponse
result
=
runP4Cmd
(
workingDir
,
args
,
CommandToWindow
|
StdErrToWindow
|
ErrorToWindow
,
QStringList
(),
QByteArray
(),
codec
);
if
(
!
result
.
error
)
showOutputInEditor
(
tr
(
"p4 filelog %1"
).
arg
(
id
),
result
.
stdOut
,
VCSBase
::
LogOutput
,
VCSBase
::
VCSBaseEditor
::
getSource
(
workingDir
,
fileNames
),
codec
);
if
(
!
result
.
error
)
{
const
QString
source
=
VCSBase
::
VCSBaseEditor
::
getSource
(
workingDir
,
fileNames
);
Core
::
IEditor
*
editor
=
showOutputInEditor
(
tr
(
"p4 filelog %1"
).
arg
(
id
),
result
.
stdOut
,
VCSBase
::
LogOutput
,
source
,
codec
);
if
(
enableAnnotationContextMenu
)
VCSBase
::
VCSBaseEditor
::
getVcsBaseEditor
(
editor
)
->
setFileLogAnnotateEnabled
(
true
);
}
}
void
PerforcePlugin
::
updateActions
(
VCSBase
::
VCSBasePlugin
::
ActionState
as
)
...
...
@@ -759,6 +797,8 @@ void PerforcePlugin::updateActions(VCSBase::VCSBasePlugin::ActionState as)
if
(
!
VCSBase
::
VCSBasePlugin
::
enableMenuAction
(
as
,
m_menuAction
))
return
;
m_logRepositoryAction
->
setEnabled
(
currentState
().
hasTopLevel
());
const
QString
fileName
=
currentState
().
currentFileName
();
m_editAction
->
setParameter
(
fileName
);
m_addAction
->
setParameter
(
fileName
);
...
...
@@ -769,6 +809,7 @@ void PerforcePlugin::updateActions(VCSBase::VCSBasePlugin::ActionState as)
m_filelogCurrentAction
->
setParameter
(
fileName
);
const
QString
projectName
=
currentState
().
currentProjectName
();
m_logProjectAction
->
setParameter
(
projectName
);
m_updateProjectAction
->
setParameter
(
projectName
);
m_diffProjectAction
->
setParameter
(
projectName
);
m_submitProjectAction
->
setParameter
(
projectName
);
...
...
@@ -1110,6 +1151,8 @@ Core::IEditor * PerforcePlugin::showOutputInEditor(const QString& title, const Q
qDebug
()
<<
"PerforcePlugin::showOutputInEditor"
<<
title
<<
kind
<<
"Size= "
<<
output
.
size
()
<<
" Type="
<<
editorType
<<
debugCodec
(
codec
);
QString
s
=
title
;
Core
::
IEditor
*
editor
=
Core
::
EditorManager
::
instance
()
->
openEditorWithContents
(
kind
,
&
s
,
output
);
connect
(
editor
,
SIGNAL
(
annotateRevisionRequested
(
QString
,
QString
,
int
)),
this
,
SLOT
(
annotateVersion
(
QString
,
QString
,
int
)));
PerforceEditor
*
e
=
qobject_cast
<
PerforceEditor
*>
(
editor
->
widget
());
if
(
!
e
)
return
0
;
...
...
src/plugins/perforce/perforceplugin.h
View file @
d797eb43
...
...
@@ -123,6 +123,8 @@ private slots:
void
annotateVersion
(
const
QString
&
file
,
const
QString
&
revision
,
int
lineNumber
);
void
filelogCurrentFile
();
void
filelog
();
void
logProject
();
void
logRepository
();
void
submitCurrentLog
();
void
printPendingChanges
();
...
...
@@ -177,7 +179,8 @@ private:
QString
clientFilePath
(
const
QString
&
serverFilePath
);
void
annotate
(
const
QString
&
workingDir
,
const
QString
&
fileName
,
const
QString
&
changeList
=
QString
(),
int
lineNumber
=
-
1
);
void
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
fileNames
);
void
filelog
(
const
QString
&
workingDir
,
const
QStringList
&
fileNames
=
QStringList
(),
bool
enableAnnotationContextMenu
=
false
);
void
cleanCommitMessageFile
();
bool
isCommitEditorOpen
()
const
;
QSharedPointer
<
QTemporaryFile
>
createTemporaryArgumentFile
(
const
QStringList
&
extraArgs
)
const
;
...
...
@@ -208,6 +211,8 @@ private:
QAction
*
m_annotateAction
;
Utils
::
ParameterAction
*
m_filelogCurrentAction
;
QAction
*
m_filelogAction
;
Utils
::
ParameterAction
*
m_logProjectAction
;
QAction
*
m_logRepositoryAction
;
QAction
*
m_submitCurrentLogAction
;
QAction
*
m_updateAllAction
;
bool
m_submitActionTriggered
;
...
...
src/plugins/perforce/perforcesettings.cpp
View file @
d797eb43
...
...
@@ -47,8 +47,9 @@ static const char *clientKeyC = "Client";
static
const
char
*
userKeyC
=
"User"
;
static
const
char
*
promptToSubmitKeyC
=
"PromptForSubmit"
;
static
const
char
*
timeOutKeyC
=
"TimeOut"
;
static
const
char
*
logCountKeyC
=
"LogCount"
;
enum
{
defaultTimeOutS
=
30
};
enum
{
defaultTimeOutS
=
30
,
defaultLogCount
=
1000
};
static
QString
defaultCommand
()
{
...
...
@@ -64,6 +65,7 @@ namespace Perforce {
namespace
Internal
{
Settings
::
Settings
()
:
logCount
(
defaultLogCount
),
defaultEnv
(
true
),
timeOutS
(
defaultTimeOutS
),
promptToSubmit
(
true
)
...
...
@@ -73,6 +75,7 @@ Settings::Settings() :
bool
Settings
::
equals
(
const
Settings
&
rhs
)
const
{
return
defaultEnv
==
rhs
.
defaultEnv
&&
logCount
==
rhs
.
logCount
&&
p4Command
==
rhs
.
p4Command
&&
p4Port
==
rhs
.
p4Port
&&
p4Client
==
rhs
.
p4Client
&&
p4User
==
rhs
.
p4User
&&
timeOutS
==
rhs
.
timeOutS
&&
promptToSubmit
==
rhs
.
promptToSubmit
;
...
...
@@ -111,6 +114,7 @@ void PerforceSettings::fromSettings(QSettings *settings)
m_settings
.
p4User
=
settings
->
value
(
QLatin1String
(
userKeyC
),
QString
()).
toString
();
m_settings
.
timeOutS
=
settings
->
value
(
QLatin1String
(
timeOutKeyC
),
defaultTimeOutS
).
toInt
();
m_settings
.
promptToSubmit
=
settings
->
value
(
QLatin1String
(
promptToSubmitKeyC
),
true
).
toBool
();
m_settings
.
logCount
=
settings
->
value
(
QLatin1String
(
logCountKeyC
),
int
(
defaultLogCount
)).
toInt
();
settings
->
endGroup
();
}
...
...
@@ -124,6 +128,7 @@ void PerforceSettings::toSettings(QSettings *settings) const
settings
->
setValue
(
QLatin1String
(
userKeyC
),
m_settings
.
p4User
);
settings
->
setValue
(
QLatin1String
(
timeOutKeyC
),
m_settings
.
timeOutS
);
settings
->
setValue
(
QLatin1String
(
promptToSubmitKeyC
),
m_settings
.
promptToSubmit
);
settings
->
setValue
(
QLatin1String
(
logCountKeyC
),
m_settings
.
logCount
);
settings
->
endGroup
();
}
...
...
src/plugins/perforce/perforcesettings.h
View file @
d797eb43
...
...
@@ -57,6 +57,7 @@ struct Settings {
QString
p4Client
;
QString
p4User
;
QString
errorString
;
int
logCount
;
bool
defaultEnv
;
int
timeOutS
;
bool
promptToSubmit
;
...
...
@@ -97,6 +98,8 @@ public:
inline
int
timeOutMS
()
const
{
return
m_settings
.
timeOutS
*
1000
;
}
inline
int
longTimeOutMS
()
const
{
return
m_settings
.
timeOutS
*
10000
;
}
inline
int
logCount
()
const
{
return
m_settings
.
logCount
;
}
QString
topLevel
()
const
;
QString
topLevelSymLinkTarget
()
const
;
...
...
src/plugins/perforce/settingspage.cpp
View file @
d797eb43
...
...
@@ -82,6 +82,7 @@ Settings SettingsPageWidget::settings() const
settings
.
p4User
=
m_ui
.
userLineEdit
->
text
();
settings
.
p4Client
=
m_ui
.
clientLineEdit
->
text
();
settings
.
timeOutS
=
m_ui
.
timeOutSpinBox
->
value
();
settings
.
logCount
=
m_ui
.
logCountSpinBox
->
value
();
settings
.
promptToSubmit
=
m_ui
.
promptToSubmitCheckBox
->
isChecked
();
return
settings
;
}
...
...
@@ -93,6 +94,7 @@ void SettingsPageWidget::setSettings(const PerforceSettings &s)
m_ui
.
portLineEdit
->
setText
(
s
.
p4Port
());
m_ui
.
clientLineEdit
->
setText
(
s
.
p4Client
());
m_ui
.
userLineEdit
->
setText
(
s
.
p4User
());
m_ui
.
logCountSpinBox
->
setValue
(
s
.
logCount
());
m_ui
.
timeOutSpinBox
->
setValue
(
s
.
timeOutS
());
m_ui
.
promptToSubmitCheckBox
->
setChecked
(
s
.
promptToSubmit
());
}
...
...
src/plugins/perforce/settingspage.ui
View file @
d797eb43
...
...
@@ -90,21 +90,17 @@
<string>
Miscellaneous
</string>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout_2"
>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"promptToSubmitCheckBox"
>
<property
name=
"text"
>
<string>
Prompt on submit
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<property
name=
"fieldGrowthPolicy"
>
<enum>
QFormLayout::ExpandingFieldsGrow
</enum>
</property>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"timeOutLabel"
>
<property
name=
"text"
>
<string>
Timeout:
</string>
</property>
</widget>
</item>
<item
row=
"
0
"
column=
"1"
>
<item
row=
"
1
"
column=
"1"
>
<widget
class=
"QSpinBox"
name=
"timeOutSpinBox"
>
<property
name=
"suffix"
>
<string>
s
</string>
...
...
@@ -117,6 +113,27 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"promptToSubmitCheckBox"
>
<property
name=
"text"
>
<string>
Prompt on submit
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"logCountLabel"
>
<property
name=
"text"
>
<string>
Log count:
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QSpinBox"
name=
"logCountSpinBox"
>
<property
name=
"maximum"
>
<number>
10000
</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
View file @
d797eb43
...
...
@@ -31,9 +31,8 @@
#include "maemodeviceconfigurations.h"
#include "maemomanager.h"
#include "maemorunconfigurationwidget.h"
#include "maemoruncontrol.h"
#include "maemosettingspage.h"
#include "maemosshthread.h"
#include "maemotoolchain.h"
#include "profilereader.h"
#include "qt4project.h"
...
...
@@ -49,55 +48,12 @@
#include <projectexplorer/session.h>
#include <QtCore/QDebug>
#include <QtCore/QPair>
#include <QtCore/QProcess>
#include <QtCore/QSharedPointer>
#include <QtGui/QComboBox>
#include <QtGui/QCheckBox>
#include <QtGui/QDesktopServices>
#include <QtGui/QFormLayout>
#include <QtGui/QFrame>
#include <QtGui/QHBoxLayout>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QRadioButton>
#include <QtGui/QToolButton>
using
namespace
ProjectExplorer
;
using
namespace
Qt4ProjectManager
;
using
namespace
Qt4ProjectManager
::
Internal
;
class
MaemoRunConfigurationWidget
:
public
QWidget
{
Q_OBJECT
public:
MaemoRunConfigurationWidget
(
MaemoRunConfiguration
*
runConfiguration
,
QWidget
*
parent
=
0
);
private
slots
:
void
configNameEdited
(
const
QString
&
text
);
void
argumentsEdited
(
const
QString
&
args
);
void
deviceConfigurationChanged
(
const
QString
&
name
);
void
resetDeviceConfigurations
();
void
showSettingsDialog
();
void
updateSimulatorPath
();
void
updateTargetInformation
();
namespace
Qt4ProjectManager
{
namespace
Internal
{
private:
void
setSimInfoVisible
(
const
MaemoDeviceConfig
&
devConf
);
QLineEdit
*
m_configNameLineEdit
;
QLineEdit
*
m_argsLineEdit
;
QLabel
*
m_executableLabel
;
QLabel
*
m_debuggerLabel
;
QComboBox
*
m_devConfBox
;
QLabel
*
m_simPathNameLabel
;
QLabel
*
m_simPathValueLabel
;
MaemoRunConfiguration
*
m_runConfiguration
;
};
using
namespace
ProjectExplorer
;
void
ErrorDumper
::
printToStream
(
QProcess
::
ProcessError
error
)
{
...
...
@@ -594,116 +550,8 @@ void MaemoRunConfiguration::updateDeviceConfigurations()
emit
deviceConfigurationsUpdated
();
}
// #pragma mark -- MaemoRunConfigurationWidget
MaemoRunConfigurationWidget
::
MaemoRunConfigurationWidget
(
MaemoRunConfiguration
*
runConfiguration
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
m_runConfiguration
(
runConfiguration
)
{
QFormLayout
*
mainLayout
=
new
QFormLayout
;
setLayout
(
mainLayout
);
mainLayout
->
setFormAlignment
(
Qt
::
AlignLeft
|
Qt
::
AlignVCenter
);
m_configNameLineEdit
=
new
QLineEdit
(
m_runConfiguration
->
name
());
mainLayout
->
addRow
(
tr
(
"Run configuration name:"
),
m_configNameLineEdit
);
QWidget
*
devConfWidget
=
new
QWidget
;
QHBoxLayout
*
devConfLayout
=
new
QHBoxLayout
(
devConfWidget
);
m_devConfBox
=
new
QComboBox
;
m_devConfBox
->
setSizeAdjustPolicy
(
QComboBox
::
AdjustToContents
);
devConfLayout
->
addWidget
(
m_devConfBox
);
QLabel
*
addDevConfLabel
=
new
QLabel
(
tr
(
"<a href=
\"
#
\"
>Manage device configurations</a>"
));
devConfLayout
->
addWidget
(
addDevConfLabel
);
mainLayout
->
addRow
(
new
QLabel
(
tr
(
"Device Configuration:"
)),
devConfWidget
);
m_executableLabel
=
new
QLabel
(
m_runConfiguration
->
executable
());
mainLayout
->
addRow
(
tr
(
"Executable:"
),
m_executableLabel
);
m_argsLineEdit
=
new
QLineEdit
(
m_runConfiguration
->
arguments
().
join
(
" "
<