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
b850cc4d
Commit
b850cc4d
authored
Mar 01, 2011
by
Friedemann Kleint
Browse files
L10n: Fix duplicated messages.
Remove duplicated message, fix WinGuiProcess' messages.
parent
fa4dc9ff
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/libs/utils/abstractprocess.cpp
0 → 100644
View file @
b850cc4d
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** No Commercial Usage
**
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#include
"abstractprocess.h"
#include
<QtCore/QCoreApplication>
namespace
Utils
{
AbstractProcess
::
AbstractProcess
()
{
}
AbstractProcess
::~
AbstractProcess
()
{
}
QString
AbstractProcess
::
workingDirectory
()
const
{
return
m_workingDir
;
}
void
AbstractProcess
::
setWorkingDirectory
(
const
QString
&
dir
)
{
m_workingDir
=
dir
;
}
void
AbstractProcess
::
setEnvironment
(
const
Environment
&
env
)
{
m_environment
=
env
;
}
Environment
AbstractProcess
::
environment
()
const
{
return
m_environment
;
}
QString
AbstractProcess
::
msgWinCannotRetrieveDebuggingOutput
()
{
return
QCoreApplication
::
translate
(
"Utils::AbstractProcess"
,
"Cannot retrieve debugging output."
);
}
}
// namespace Utils
src/libs/utils/abstractprocess.h
View file @
b850cc4d
...
...
@@ -45,14 +45,14 @@ namespace Utils {
class
QTCREATOR_UTILS_EXPORT
AbstractProcess
{
public:
AbstractProcess
()
{}
virtual
~
AbstractProcess
()
{}
AbstractProcess
()
;
virtual
~
AbstractProcess
()
;
QString
workingDirectory
()
const
{
return
m_workingDir
;
}
void
setWorkingDirectory
(
const
QString
&
dir
)
{
m_workingDir
=
dir
;
}
QString
workingDirectory
()
const
;
void
setWorkingDirectory
(
const
QString
&
dir
)
;
void
setEnvironment
(
const
Environment
&
env
)
{
m_environment
=
env
;
}
Environment
environment
()
const
{
return
m_environment
;
}
void
setEnvironment
(
const
Environment
&
env
)
;
Environment
environment
()
const
;
virtual
bool
start
(
const
QString
&
program
,
const
QString
&
args
)
=
0
;
virtual
void
stop
()
=
0
;
...
...
@@ -61,6 +61,8 @@ public:
virtual
qint64
applicationPID
()
const
=
0
;
virtual
int
exitCode
()
const
=
0
;
static
QString
msgWinCannotRetrieveDebuggingOutput
();
//signals:
virtual
void
processMessage
(
const
QString
&
error
,
bool
isError
)
=
0
;
...
...
src/libs/utils/utils-lib.pri
View file @
b850cc4d
...
...
@@ -10,6 +10,7 @@ QT += network
SOURCES += $$PWD/environment.cpp \
$$PWD/environmentmodel.cpp \
$$PWD/qtcprocess.cpp \
$$PWD/abstractprocess.cpp \
$$PWD/reloadpromptutils.cpp \
$$PWD/stringutils.cpp \
$$PWD/filesearch.cpp \
...
...
src/plugins/debugger/qml/qmlengine.cpp
View file @
b850cc4d
...
...
@@ -55,6 +55,7 @@
#include
<projectexplorer/applicationlauncher.h>
#include
<utils/environment.h>
#include
<utils/abstractprocess.h>
#include
<utils/qtcassert.h>
#include
<coreplugin/icore.h>
...
...
@@ -291,10 +292,8 @@ bool QmlEngine::canDisplayTooltip() const
void
QmlEngine
::
filterApplicationMessage
(
const
QString
&
msg
,
int
/*channel*/
)
{
static
QString
qddserver
=
QLatin1String
(
"QDeclarativeDebugServer: "
);
//: Must be the same translation as the one in WinGuiProcess
static
QString
cannotRetrieve
=
tr
(
"Cannot retrieve debugging output!"
);
int
index
=
msg
.
indexOf
(
qddserver
);
const
int
index
=
msg
.
indexOf
(
qddserver
);
if
(
index
!=
-
1
)
{
QString
status
=
msg
;
status
.
remove
(
0
,
index
+
qddserver
.
length
());
// chop of 'QDeclarativeDebugServer: '
...
...
@@ -339,7 +338,7 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/)
infoBox
->
show
();
}
}
else
if
(
msg
.
contains
(
cannotRetrieve
))
{
}
else
if
(
msg
.
contains
(
Utils
::
AbstractProcess
::
msgWinCannotRetrieveDebuggingOutput
()
))
{
// we won't get debugging output, so just try to connect ...
d
->
m_adapter
.
beginConnection
();
}
...
...
src/plugins/projectexplorer/winguiprocess.cpp
View file @
b850cc4d
...
...
@@ -35,6 +35,7 @@
#include
"consoleprocess.h"
#include
<utils/qtcprocess.h>
#include
<utils/winutils.h>
#include
<QtCore/QDir>
...
...
@@ -131,13 +132,14 @@ void WinGuiProcess::run()
&
si
,
m_pid
);
if
(
!
started
)
{
emit
processMessage
(
tr
(
"The process could not be started!"
),
true
);
emit
processMessage
(
tr
(
"The process could not be started: %1"
).
arg
(
Utils
::
winErrorMessage
(
GetLastError
())),
true
);
break
;
}
if
(
!
dbgInterface
)
{
// Text is
dublicat
ed in qmlengine.cpp
emit
receivedDebugOutput
(
tr
(
"
Cannot
r
etrieve
d
ebugging
o
utput
!"
),
true
);
// Text is
filter
ed in qmlengine.cpp
emit
receivedDebugOutput
(
Utils
::
AbstractProcess
::
msgWin
Cannot
R
etrieve
D
ebugging
O
utput
(
),
true
);
WaitForSingleObject
(
m_pid
->
hProcess
,
INFINITE
);
}
else
{
LPSTR
message
;
...
...
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