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
6d5eeb7a
Commit
6d5eeb7a
authored
Apr 17, 2009
by
Oswald Buddenhagen
Browse files
add missing tr()s, etc., add some //: comments
parent
9db13e32
Changes
35
Hide whitespace changes
Inline
Side-by-side
src/plugins/bookmarks/bookmarkmanager.cpp
View file @
6d5eeb7a
...
...
@@ -226,8 +226,8 @@ BookmarkView::~BookmarkView()
void
BookmarkView
::
contextMenuEvent
(
QContextMenuEvent
*
event
)
{
QMenu
menu
;
QAction
*
remove
=
menu
.
addAction
(
"&Remove Bookmark"
);
QAction
*
removeAll
=
menu
.
addAction
(
"Remove all Bookmarks"
);
QAction
*
remove
=
menu
.
addAction
(
tr
(
"&Remove Bookmark"
)
)
;
QAction
*
removeAll
=
menu
.
addAction
(
tr
(
"Remove all Bookmarks"
)
)
;
m_contextMenuIndex
=
indexAt
(
event
->
pos
());
if
(
!
m_contextMenuIndex
.
isValid
())
remove
->
setEnabled
(
false
);
...
...
src/plugins/bookmarks/bookmarksplugin.cpp
View file @
6d5eeb7a
...
...
@@ -162,7 +162,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
addAutoReleasedObject
(
new
BookmarkViewFactory
(
m_bookmarkManager
));
m_bookmarkMarginAction
=
new
QAction
(
this
);
m_bookmarkMarginAction
->
setText
(
"Toggle Bookmark"
);
m_bookmarkMarginAction
->
setText
(
tr
(
"Toggle Bookmark"
)
)
;
//m_bookmarkAction->setIcon(QIcon(":/gdbdebugger/images/breakpoint.svg"));
connect
(
m_bookmarkMarginAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
bookmarkMarginActionTriggered
()));
...
...
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
View file @
6d5eeb7a
...
...
@@ -207,7 +207,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard)
m_pc
=
new
Core
::
Utils
::
PathChooser
(
this
);
m_pc
->
setPath
(
m_cmakeWizard
->
buildDirectory
());
connect
(
m_pc
,
SIGNAL
(
changed
()),
this
,
SLOT
(
buildDirectoryChanged
()));
fl
->
addRow
(
"Build directory:"
,
m_pc
);
fl
->
addRow
(
tr
(
"Build directory:"
)
,
m_pc
);
}
void
ShadowBuildPage
::
buildDirectoryChanged
()
...
...
src/plugins/cmakeprojectmanager/cmakeproject.cpp
View file @
6d5eeb7a
...
...
@@ -610,7 +610,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeProject *project)
// and then cmake builds in that directory instead of shadow building
// We need our own generator for that to work
connect
(
m_pathChooser
,
SIGNAL
(
changed
()),
this
,
SLOT
(
buildDirectoryChanged
()));
fl
->
addRow
(
"Build directory:"
,
m_pathChooser
);
fl
->
addRow
(
tr
(
"Build directory:"
)
,
m_pathChooser
);
}
QString
CMakeBuildSettingsWidget
::
displayName
()
const
...
...
src/plugins/cmakeprojectmanager/makestep.cpp
View file @
6d5eeb7a
...
...
@@ -256,12 +256,12 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
setLayout
(
fl
);
m_additionalArguments
=
new
QLineEdit
(
this
);
fl
->
addRow
(
"Additional arguments:"
,
m_additionalArguments
);
fl
->
addRow
(
tr
(
"Additional arguments:"
)
,
m_additionalArguments
);
connect
(
m_additionalArguments
,
SIGNAL
(
textEdited
(
const
QString
&
)),
this
,
SLOT
(
additionalArgumentsEdited
()));
m_targetsList
=
new
QListWidget
;
fl
->
addRow
(
"Targets:"
,
m_targetsList
);
fl
->
addRow
(
tr
(
"Targets:"
)
,
m_targetsList
);
// TODO update this list also on rescans of the CMakeLists.txt
CMakeProject
*
pro
=
m_makeStep
->
project
();
...
...
src/plugins/coreplugin/welcomemode.cpp
View file @
6d5eeb7a
...
...
@@ -100,12 +100,13 @@ WelcomeModePrivate::WelcomeModePrivate() :
#if defined(QT_NO_WEBKIT)
const
char
*
LABEL
=
"<center><table><tr><td><img src=
\"
:/core/html/images/product_logo.png
\"
/></td><td width=300>"
const
char
LABEL
[]
=
Q_TRANSLATE_NOOP
(
"Core::Internal::WelcomeMode"
,
"<center><table><tr><td><img src=
\"
:/core/html/images/product_logo.png
\"
/></td><td width=300>"
"<h2><br/><br/>Welcome</h2><p> Qt Creator is an intuitive, modern cross platform IDE that enables "
"developers to create graphically appealing applications for desktop, "
"embedded, and mobile devices. "
"<p><font color=
\"
red
\"
>(This startup page lacks features due to disabled
w
eb
k
it support)</font>"
"</td></tr></table>"
;
"<p><font color=
\"
red
\"
>(This startup page lacks features due to disabled
W
eb
K
it support)</font>"
"</td></tr></table>"
)
;
#endif
// --- WelcomePageData
...
...
@@ -157,7 +158,7 @@ WelcomeMode::WelcomeMode() :
#else
m_d
->
m_label
->
setWordWrap
(
true
);
m_d
->
m_label
->
setAlignment
(
Qt
::
AlignCenter
);
m_d
->
m_label
->
setText
(
LABEL
);
m_d
->
m_label
->
setText
(
tr
(
LABEL
)
)
;
l
->
addWidget
(
m_d
->
m_label
);
#endif
}
...
...
src/plugins/cpaster/cpasterplugin.cpp
View file @
6d5eeb7a
...
...
@@ -208,7 +208,7 @@ void CodepasterPlugin::fetch()
Ui_PasteSelectDialog
ui
;
ui
.
setupUi
(
&
dialog
);
ui
.
listWidget
->
addItems
(
QStringList
()
<<
"Waiting for items"
);
ui
.
listWidget
->
addItems
(
QStringList
()
<<
tr
(
"Waiting for items"
)
)
;
ui
.
listWidget
->
setSelectionMode
(
QAbstractItemView
::
ExtendedSelection
);
ui
.
listWidget
->
setFrameStyle
(
QFrame
::
NoFrame
);
m_fetcher
->
list
(
ui
.
listWidget
);
...
...
@@ -245,15 +245,15 @@ void CustomFetcher::customRequestFinished(int, bool error)
{
m_customError
=
error
;
if
(
m_customError
||
hadError
())
{
QMessageBox
::
warning
(
0
,
QLatin1String
(
"CodePaster Error"
)
,
QLatin1String
(
"Could not fetch code"
)
QMessageBox
::
warning
(
0
,
tr
(
"CodePaster Error"
)
,
tr
(
"Could not fetch code"
)
,
QMessageBox
::
Ok
);
return
;
}
QByteArray
data
=
body
();
if
(
!
m_listWidget
)
{
QString
title
=
QString
::
fromLatin1
(
"Code
Paster: %1"
).
arg
(
m_id
);
QString
title
=
QString
::
fromLatin1
(
"CodePaster: %1"
).
arg
(
m_id
);
EditorManager
::
instance
()
->
newFile
(
Core
::
Constants
::
K_DEFAULT_TEXT_EDITOR
,
&
title
,
data
);
}
else
{
m_listWidget
->
clear
();
...
...
@@ -295,7 +295,7 @@ void CustomPoster::customRequestFinished(int, bool error)
QApplication
::
clipboard
()
->
setText
(
pastedUrl
());
ICore
::
instance
()
->
messageManager
()
->
printToOutputPane
(
pastedUrl
(),
m_output
);
}
else
QMessageBox
::
warning
(
0
,
"Code
Paster Error"
,
"Some error occured while posting"
,
QMessageBox
::
Ok
);
QMessageBox
::
warning
(
0
,
tr
(
"CodePaster Error"
)
,
tr
(
"Some error occured while posting"
)
,
QMessageBox
::
Ok
);
#if 0 // Figure out how to access
Core::Internal::MessageOutputWindow* messageWindow =
ExtensionSystem::PluginManager::instance()->getObject<Core::Internal::MessageOutputWindow>();
...
...
src/plugins/cpptools/cppmodelmanager.cpp
View file @
6d5eeb7a
...
...
@@ -68,6 +68,7 @@
#include <Lexer.h>
#include <Token.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QMutexLocker>
#include <QtCore/QTime>
...
...
@@ -470,10 +471,8 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type,
m_currentDoc
->
addIncludeFile
(
fileName
,
line
);
if
(
contents
.
isEmpty
()
&&
!
QFileInfo
(
fileName
).
isAbsolute
())
{
QString
msg
;
msg
+=
fileName
;
msg
+=
QLatin1String
(
": No such file or directory"
);
QString
msg
=
QCoreApplication
::
translate
(
"CppPreprocessor"
,
"%1: No such file or directory"
).
arg
(
fileName
);
Document
::
DiagnosticMessage
d
(
Document
::
DiagnosticMessage
::
Warning
,
m_currentDoc
->
fileName
(),
...
...
src/plugins/debugger/debuggeroutputwindow.cpp
View file @
6d5eeb7a
...
...
@@ -67,14 +67,14 @@ public:
:
QPlainTextEdit
(
parent
)
{
m_clearContentsAction
=
new
QAction
(
this
);
m_clearContentsAction
->
setText
(
"Clear contents"
);
m_clearContentsAction
->
setText
(
tr
(
"Clear contents"
)
)
;
m_clearContentsAction
->
setEnabled
(
true
);
m_clearContentsAction
->
setShortcut
(
Qt
::
ControlModifier
+
Qt
::
Key_R
);
connect
(
m_clearContentsAction
,
SIGNAL
(
triggered
(
bool
)),
parent
,
SLOT
(
clearContents
()));
m_saveContentsAction
=
new
QAction
(
this
);
m_saveContentsAction
->
setText
(
"Save contents"
);
m_saveContentsAction
->
setText
(
tr
(
"Save contents"
)
)
;
m_saveContentsAction
->
setEnabled
(
true
);
}
...
...
@@ -149,7 +149,7 @@ private:
void
focusInEvent
(
QFocusEvent
*
ev
)
{
emit
statusMessageRequested
(
"Type Ctrl-<Return> to execute a line."
,
-
1
);
emit
statusMessageRequested
(
tr
(
"Type Ctrl-<Return> to execute a line."
)
,
-
1
);
QPlainTextEdit
::
focusInEvent
(
ev
);
}
...
...
src/plugins/debugger/gdbengine.cpp
View file @
6d5eeb7a
...
...
@@ -2817,7 +2817,7 @@ void GdbEngine::setToolTipExpression(const QPoint &pos, const QString &exp0)
return
;
if
(
exp
.
startsWith
(
'"'
)
&&
exp
.
endsWith
(
'"'
))
{
QToolTip
::
showText
(
m_toolTipPos
,
"String literal
"
+
exp
);
QToolTip
::
showText
(
m_toolTipPos
,
tr
(
"String literal
%1"
).
arg
(
exp
)
)
;
return
;
}
...
...
@@ -3713,7 +3713,7 @@ void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record,
//qDebug() << "RECEIVED" << record.toString() << " FOR " << data0.toString()
// << " STREAM: " << out;
if
(
list
.
isEmpty
())
{
data
.
setValue
(
"<unavailable>"
);
data
.
setValue
(
tr
(
"<unavailable>"
)
)
;
data
.
setAllUnneeded
();
insertData
(
data
);
}
else
if
(
data
.
type
==
"QString"
||
data
.
type
.
endsWith
(
"::QString"
))
{
...
...
@@ -3746,7 +3746,7 @@ void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record,
sendSynchronizedCommand
(
cmd
,
WatchDebuggingHelperValue3
,
var
);
}
}
else
{
data
.
setValue
(
"<unavailable>"
);
data
.
setValue
(
tr
(
"<unavailable>"
)
)
;
data
.
setAllUnneeded
();
insertData
(
data
);
}
...
...
@@ -3840,7 +3840,7 @@ void GdbEngine::setLocals(const QList<GdbMi> &locals)
seen
[
name
]
=
n
+
1
;
WatchData
data
;
data
.
iname
=
"local."
+
name
+
QString
::
number
(
n
+
1
);
data
.
name
=
name
+
QString
(
"
<shadowed %
1
>"
).
arg
(
n
);
data
.
name
=
tr
(
"%1
<shadowed %
2
>"
).
arg
(
name
,
n
);
//data.setValue("<shadowed>");
setWatchDataValue
(
data
,
item
.
findChild
(
"value"
));
data
.
setType
(
"<shadowed>"
);
...
...
@@ -3999,7 +3999,7 @@ void GdbEngine::handleVarListChildrenHelper(const GdbMi &item,
}
else
if
(
exp
.
isEmpty
())
{
// Happens with anonymous unions
data
.
exp
=
parent
.
exp
;
data
.
name
=
"<n/a>"
;
data
.
name
=
tr
(
"<n/a>"
)
;
data
.
iname
=
parent
.
iname
+
".@"
;
data
.
type
=
"<anonymous union>"
;
}
else
{
...
...
@@ -4054,7 +4054,7 @@ void GdbEngine::handleVarListChildren(const GdbResultRecord &record,
}
else
if
(
record
.
resultClass
==
GdbResultError
)
{
data
.
setError
(
record
.
data
.
findChild
(
"msg"
).
data
());
}
else
{
data
.
setError
(
"Unknown error: "
+
record
.
toString
());
data
.
setError
(
tr
(
"Unknown error: "
)
+
record
.
toString
());
}
}
...
...
src/plugins/debugger/scriptengine.cpp
View file @
6d5eeb7a
...
...
@@ -473,13 +473,12 @@ void ScriptEngine::setToolTipExpression(const QPoint &pos, const QString &exp0)
}
if
(
!
hasLetterOrNumber
(
exp
))
{
QToolTip
::
showText
(
m_toolTipPos
,
"'"
+
exp
+
"' contains no identifier"
);
QToolTip
::
showText
(
m_toolTipPos
,
tr
(
"'%1' contains no identifier"
).
arg
(
exp
));
return
;
}
if
(
exp
.
startsWith
(
'"'
)
&&
exp
.
endsWith
(
'"'
))
{
QToolTip
::
showText
(
m_toolTipPos
,
"String literal
"
+
exp
);
QToolTip
::
showText
(
m_toolTipPos
,
tr
(
"String literal
%1"
).
arg
(
exp
)
)
;
return
;
}
...
...
src/plugins/debugger/stackhandler.cpp
View file @
6d5eeb7a
...
...
@@ -103,12 +103,15 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
return
frame
.
address
;
}
}
else
if
(
role
==
Qt
::
ToolTipRole
)
{
return
"<table><tr><td>Address:</td><td>"
+
frame
.
address
+
"</td></tr>"
+
"<tr><td>Function: </td><td>"
+
frame
.
function
+
"</td></tr>"
+
"<tr><td>File: </td><td>"
+
frame
.
file
+
"</td></tr>"
+
"<tr><td>Line: </td><td>"
+
QString
::
number
(
frame
.
line
)
+
"</td></tr>"
+
"<tr><td>From: </td><td>"
+
frame
.
from
+
"</td></tr></table>"
+
"<tr><td>To: </td><td>"
+
frame
.
to
+
"</td></tr></table>"
;
//: Tooltip for variable
return
tr
(
"<table><tr><td>Address:</td><td>%1</td></tr>"
"<tr><td>Function: </td><td>%2</td></tr>"
"<tr><td>File: </td><td>%3</td></tr>"
"<tr><td>Line: </td><td>%4</td></tr>"
"<tr><td>From: </td><td>%5</td></tr></table>"
"<tr><td>To: </td><td>%6</td></tr></table>"
)
.
arg
(
frame
.
address
,
frame
.
function
,
frame
.
file
,
QString
::
number
(
frame
.
line
),
frame
.
from
,
frame
.
to
);
}
else
if
(
role
==
Qt
::
DecorationRole
&&
index
.
column
()
==
0
)
{
// Return icon that indicates whether this is the active stack frame
return
(
index
.
row
()
==
m_currentIndex
)
?
m_positionIcon
:
m_emptyIcon
;
...
...
src/plugins/debugger/watchhandler.cpp
View file @
6d5eeb7a
...
...
@@ -64,7 +64,8 @@
using
namespace
Debugger
::
Internal
;
static
const
QString
strNotInScope
=
QLatin1String
(
"<not in scope>"
);
static
const
QString
strNotInScope
=
QCoreApplication
::
translate
(
"Debugger::Internal::WatchData"
,
"<not in scope>"
);
static
int
watcherCounter
=
0
;
...
...
src/plugins/designer/formeditorw.cpp
View file @
6d5eeb7a
...
...
@@ -360,22 +360,22 @@ void FormEditorW::setupActions()
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.WidgetEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
globalcontext
,
am
,
medit
,
QLatin1String
(
"Edit widgets"
),
m_toolActionIds
.
back
(),
tr
(
"Edit widgets"
),
m_toolActionIds
.
back
(),
EditModeWidgetEditor
,
QLatin1String
(
"widgettool.png"
),
tr
(
"F3"
));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.SignalsSlotsEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
globalcontext
,
am
,
medit
,
QLatin1String
(
"Edit signals/slots"
),
m_toolActionIds
.
back
(),
tr
(
"Edit signals/slots"
),
m_toolActionIds
.
back
(),
EditModeSignalsSlotEditor
,
QLatin1String
(
"signalslottool.png"
),
tr
(
"F4"
));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.BuddyEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
globalcontext
,
am
,
medit
,
QLatin1String
(
"Edit buddies"
),
m_toolActionIds
.
back
(),
tr
(
"Edit buddies"
),
m_toolActionIds
.
back
(),
EditModeBuddyEditor
,
QLatin1String
(
"buddytool.png"
));
m_toolActionIds
.
push_back
(
QLatin1String
(
"FormEditor.TabOrderEditor"
));
createEditModeAction
(
m_actionGroupEditMode
,
globalcontext
,
am
,
medit
,
QLatin1String
(
"Edit tab order"
),
m_toolActionIds
.
back
(),
tr
(
"Edit tab order"
),
m_toolActionIds
.
back
(),
EditModeTabOrderEditor
,
QLatin1String
(
"tabordertool.png"
));
//tool actions
...
...
src/plugins/fakevim/fakevimhandler.cpp
View file @
6d5eeb7a
...
...
@@ -848,7 +848,7 @@ void FakeVimHandler::Private::showBlackMessage(const QString &msg)
void
FakeVimHandler
::
Private
::
notImplementedYet
()
{
qDebug
()
<<
"Not implemented in FakeVim"
;
showRedMessage
(
"Not implemented in FakeVim"
);
showRedMessage
(
tr
(
"Not implemented in FakeVim"
)
)
;
updateMiniBuffer
();
}
...
...
@@ -1976,13 +1976,13 @@ void FakeVimHandler::Private::search(const QString &needle0, bool forward)
if
(
oldLine
!=
cursorLineInDocument
()
-
cursorLineOnScreen
())
scrollToLineInDocument
(
cursorLineInDocument
()
-
linesOnScreen
()
/
2
);
if
(
forward
)
showRedMessage
(
"search hit BOTTOM, continuing at TOP"
);
showRedMessage
(
tr
(
"search hit BOTTOM, continuing at TOP"
)
)
;
else
showRedMessage
(
"search hit TOP, continuing at BOTTOM"
);
showRedMessage
(
tr
(
"search hit TOP, continuing at BOTTOM"
)
)
;
highlightMatches
(
needle
);
}
else
{
m_tc
=
orig
;
showRedMessage
(
"E486: Pattern not found: "
+
needle
);
showRedMessage
(
tr
(
"E486: Pattern not found: "
)
+
needle
);
highlightMatches
(
QString
());
}
}
...
...
src/plugins/git/changeselectiondialog.cpp
View file @
6d5eeb7a
...
...
@@ -46,7 +46,7 @@ void ChangeSelectionDialog::selectWorkingDirectory()
{
static
QString
location
=
QString
();
location
=
QFileDialog
::
getExistingDirectory
(
this
,
QLatin1String
(
"Select Git repository"
),
tr
(
"Select Git repository"
),
location
);
if
(
location
.
isEmpty
())
return
;
...
...
@@ -63,7 +63,7 @@ void ChangeSelectionDialog::selectWorkingDirectory()
}
while
(
repository
.
cdUp
());
// Did not find a repo
QMessageBox
::
critical
(
this
,
QLatin1String
(
"Error"
),
QLatin1String
(
"Selected directory is not a Git repository"
));
QMessageBox
::
critical
(
this
,
tr
(
"Error"
),
tr
(
"Selected directory is not a Git repository"
));
}
src/plugins/git/gitclient.cpp
View file @
6d5eeb7a
...
...
@@ -89,6 +89,7 @@ static inline QString msgParseFilesFailed()
static
QString
formatCommand
(
const
QString
&
binary
,
const
QStringList
&
args
)
{
const
QString
timeStamp
=
QTime
::
currentTime
().
toString
(
QLatin1String
(
"HH:mm"
));
//: <timestamp> Executing: <executable> <arguments>
return
GitClient
::
tr
(
"%1 Executing: %2 %3
\n
"
).
arg
(
timeStamp
,
binary
,
args
.
join
(
QString
(
QLatin1Char
(
' '
))));
}
...
...
src/plugins/git/gitplugin.cpp
View file @
6d5eeb7a
...
...
@@ -376,7 +376,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
gitContainer
->
addAction
(
createSeparator
(
actionManager
,
globalcontext
,
QLatin1String
(
"Git.Sep.Global"
),
this
));
m_stashAction
=
new
QAction
(
tr
(
"Stash"
),
this
);
m_stashAction
->
setToolTip
(
"Saves the current state of your work."
);
m_stashAction
->
setToolTip
(
tr
(
"Saves the current state of your work."
)
)
;
command
=
actionManager
->
registerAction
(
m_stashAction
,
"Git.Stash"
,
globalcontext
);
command
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
connect
(
m_stashAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
stash
()));
...
...
@@ -389,7 +389,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
gitContainer
->
addAction
(
command
);
m_stashPopAction
=
new
QAction
(
tr
(
"Stash Pop"
),
this
);
m_stashAction
->
setToolTip
(
"Restores changes saved to the stash list using
\"
Stash
\"
."
);
m_stashAction
->
setToolTip
(
tr
(
"Restores changes saved to the stash list using
\"
Stash
\"
."
)
)
;
command
=
actionManager
->
registerAction
(
m_stashPopAction
,
"Git.StashPop"
,
globalcontext
);
command
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
connect
(
m_stashPopAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
stashPop
()));
...
...
@@ -785,7 +785,7 @@ void GitPlugin::updateActions()
const
QString
repository
=
m_gitClient
->
findRepositoryForFile
(
current
.
absoluteFilePath
());
// First check for file commands and if the current file is inside
// a Git-repository
const
QString
file
=
fileName
.
isEmpty
()
?
"File"
:
"
File
\"
"
+
fileName
+
'"'
;
const
QString
file
=
fileName
.
isEmpty
()
?
tr
(
"File"
)
:
"
\"
"
+
fileName
+
'"'
;
m_diffAction
->
setText
(
tr
(
"Diff %1"
).
arg
(
file
));
m_statusAction
->
setText
(
tr
(
"Status Related to %1"
).
arg
(
file
));
m_logAction
->
setText
(
tr
(
"Log of %1"
).
arg
(
file
));
...
...
src/plugins/helloworld/helloworldplugin.cpp
View file @
6d5eeb7a
...
...
@@ -82,7 +82,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *error_m
QLatin1String
(
"HelloWorld.MainView"
));
// Create an action to be triggered by a menu entry
QAction
*
helloWorldAction
=
new
QAction
(
"Say
\"
&Hello World!
\"
"
,
this
);
QAction
*
helloWorldAction
=
new
QAction
(
tr
(
"Say
\"
&Hello World!
\"
"
)
,
this
);
connect
(
helloWorldAction
,
SIGNAL
(
triggered
()),
SLOT
(
sayHelloWorld
()));
// Register the action with the action manager
...
...
@@ -143,7 +143,7 @@ void HelloWorldPlugin::sayHelloWorld()
// When passing 0 for the parent, the message box becomes an
// application-global modal dialog box
QMessageBox
::
information
(
0
,
"Hello World!"
,
"Hello World! Beautiful day today, isn't it?"
);
0
,
tr
(
"Hello World!"
)
,
tr
(
"Hello World! Beautiful day today, isn't it?"
)
)
;
}
Q_EXPORT_PLUGIN
(
HelloWorldPlugin
)
src/plugins/helloworld/helloworldwindow.cpp
View file @
6d5eeb7a
...
...
@@ -38,6 +38,6 @@ HelloWorldWindow::HelloWorldWindow(QWidget *parent)
:
QWidget
(
parent
)
{
QBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
addWidget
(
new
QTextEdit
(
"Focus me to activate my context!"
));
layout
->
addWidget
(
new
QTextEdit
(
tr
(
"Focus me to activate my context!"
))
)
;
setWindowTitle
(
tr
(
"Hello, world!"
));
}
Prev
1
2
Next
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