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
SDK
Cervisia
Commits
e08a02a8
Commit
e08a02a8
authored
Jul 31, 2022
by
Laurent Montel
Browse files
KMessageBox::sorry is deprecated in kf5.97
parent
bf242b9e
Pipeline
#210938
passed with stage
in 2 minutes and 10 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
addignoremenu.cpp
View file @
e08a02a8
...
...
@@ -82,7 +82,7 @@ void AddIgnoreMenu::appendIgnoreFile(const QString &path, const QString &fileNam
{
QFile
ignoreFile
(
path
+
"/.cvsignore"
);
if
(
!
ignoreFile
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Append
|
QIODevice
::
Text
))
{
KMessageBox
::
sorry
(
0
,
i18n
(
"Cannot open file '%1' for writing."
,
ignoreFile
.
fileName
()),
"Cervisia"
);
KMessageBox
::
error
(
0
,
i18n
(
"Cannot open file '%1' for writing."
,
ignoreFile
.
fileName
()),
"Cervisia"
);
return
;
}
...
...
cervisiapart.cpp
View file @
e08a02a8
...
...
@@ -115,7 +115,7 @@ CervisiaPart::CervisiaPart(QWidget *parentWidget, QObject *parent, const QVarian
// start the cvs D-Bus service
QString
error
;
if
(
KToolInvocation
::
startServiceByDesktopName
(
"org.kde.cvsservice5"
,
QStringList
(),
&
error
,
&
m_cvsServiceInterfaceName
))
{
KMessageBox
::
sorry
(
0
,
i18n
(
"Starting cvsservice failed with message: "
)
+
error
,
"Cervisia"
);
KMessageBox
::
error
(
0
,
i18n
(
"Starting cvsservice failed with message: "
)
+
error
,
"Cervisia"
);
}
else
// create a reference to the service
cvsService
=
new
OrgKdeCervisia5CvsserviceCvsserviceInterface
(
m_cvsServiceInterfaceName
,
"/CvsService"
,
QDBusConnection
::
sessionBus
(),
this
);
...
...
@@ -182,7 +182,7 @@ bool CervisiaPart::openUrl(const QUrl &u)
{
// right now, we are unfortunately not network-aware
if
(
!
u
.
isLocalFile
())
{
KMessageBox
::
sorry
(
widget
(),
KMessageBox
::
error
(
widget
(),
i18n
(
"Remote CVS working folders are not "
"supported."
),
"Cervisia"
);
...
...
@@ -190,7 +190,7 @@ bool CervisiaPart::openUrl(const QUrl &u)
}
if
(
hasRunningJob
)
{
KMessageBox
::
sorry
(
widget
(),
KMessageBox
::
error
(
widget
(),
i18n
(
"You cannot change to a different folder "
"while there is a running cvs job."
),
"Cervisia"
);
...
...
@@ -1308,7 +1308,7 @@ void CervisiaPart::slotMakePatch()
QFile
f
(
fileName
);
if
(
!
f
.
open
(
QIODevice
::
WriteOnly
))
{
KMessageBox
::
sorry
(
widget
(),
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
KMessageBox
::
error
(
widget
(),
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
return
;
}
...
...
@@ -1458,11 +1458,11 @@ void CervisiaPart::slotLastChange()
int
pos
,
lastnumber
=
0
;
bool
ok
;
if
((
pos
=
revA
.
lastIndexOf
(
'.'
))
==
-
1
||
(
lastnumber
=
revA
.
right
(
revA
.
length
()
-
pos
-
1
).
toUInt
(
&
ok
),
!
ok
))
{
KMessageBox
::
sorry
(
widget
(),
i18n
(
"The revision looks invalid."
),
"Cervisia"
);
KMessageBox
::
error
(
widget
(),
i18n
(
"The revision looks invalid."
),
"Cervisia"
);
return
;
}
if
(
lastnumber
==
0
)
{
KMessageBox
::
sorry
(
widget
(),
i18n
(
"This is the first revision of the branch."
),
"Cervisia"
);
KMessageBox
::
error
(
widget
(),
i18n
(
"This is the first revision of the branch."
),
"Cervisia"
);
return
;
}
revB
=
revA
.
left
(
pos
+
1
);
...
...
@@ -1629,7 +1629,7 @@ bool CervisiaPart::openSandbox(const QUrl &url)
QDBusReply
<
bool
>
reply
=
cvsRepository
.
setWorkingCopy
(
url
.
path
());
if
(
!
reply
.
isValid
()
||
!
reply
.
value
())
{
KMessageBox
::
sorry
(
widget
(),
KMessageBox
::
error
(
widget
(),
i18n
(
"This is not a CVS folder.
\n
"
"If you did not intend to use Cervisia, you can "
"switch view modes within Konqueror."
),
...
...
changelogdialog.cpp
View file @
e08a02a8
...
...
@@ -83,7 +83,7 @@ void ChangeLogDialog::slotOk()
// Write changelog
QFile
f
(
fname
);
if
(
!
f
.
open
(
QIODevice
::
ReadWrite
))
{
KMessageBox
::
sorry
(
this
,
i18n
(
"The ChangeLog file could not be written."
),
"Cervisia"
);
KMessageBox
::
error
(
this
,
i18n
(
"The ChangeLog file could not be written."
),
"Cervisia"
);
return
;
}
...
...
@@ -104,7 +104,7 @@ bool ChangeLogDialog::readFile(const QString &filename)
}
else
{
QFile
f
(
filename
);
if
(
!
f
.
open
(
QIODevice
::
ReadWrite
))
{
KMessageBox
::
sorry
(
this
,
i18n
(
"The ChangeLog file could not be read."
),
"Cervisia"
);
KMessageBox
::
error
(
this
,
i18n
(
"The ChangeLog file could not be read."
),
"Cervisia"
);
return
false
;
}
QTextStream
stream
(
&
f
);
...
...
cvsservice/cvsservice.cpp
View file @
e08a02a8
...
...
@@ -879,7 +879,7 @@ QDBusObjectPath CvsService::Private::setupNonConcurrentJob(Repository *repo)
bool
CvsService
::
Private
::
hasWorkingCopy
()
{
if
(
repository
->
workingCopy
().
isEmpty
())
{
KMessageBox
::
sorry
(
0
,
KMessageBox
::
error
(
0
,
i18n
(
"You have to set a local working copy "
"directory before you can use this function!"
));
return
false
;
...
...
@@ -893,7 +893,7 @@ bool CvsService::Private::hasRunningJob()
bool
result
=
singleCvsJob
->
isRunning
();
if
(
result
)
KMessageBox
::
sorry
(
0
,
i18n
(
"There is already a job running"
));
KMessageBox
::
error
(
0
,
i18n
(
"There is already a job running"
));
return
result
;
}
diffdialog.cpp
View file @
e08a02a8
...
...
@@ -470,7 +470,7 @@ void DiffDialog::saveAsClicked()
QFile
f
(
fileName
);
if
(
!
f
.
open
(
QIODevice
::
WriteOnly
))
{
KMessageBox
::
sorry
(
this
,
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
KMessageBox
::
error
(
this
,
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
return
;
}
...
...
logdialog.cpp
View file @
e08a02a8
...
...
@@ -482,7 +482,7 @@ void LogDialog::slotPatch()
QFile
f
(
fileName
);
if
(
!
f
.
open
(
QIODevice
::
WriteOnly
))
{
KMessageBox
::
sorry
(
this
,
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
KMessageBox
::
error
(
this
,
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
return
;
}
...
...
resolvedialog.cpp
View file @
e08a02a8
...
...
@@ -348,7 +348,7 @@ void ResolveDialog::saveFile(const QString &name)
{
QFile
f
(
name
);
if
(
!
f
.
open
(
QIODevice
::
WriteOnly
))
{
KMessageBox
::
sorry
(
this
,
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
KMessageBox
::
error
(
this
,
i18n
(
"Could not open file for writing."
),
"Cervisia"
);
return
;
}
QTextStream
stream
(
&
f
);
...
...
tagdialog.cpp
View file @
e08a02a8
...
...
@@ -131,12 +131,12 @@ void TagDialog::slotOk()
QString
const
str
(
tag
());
if
(
str
.
isEmpty
())
{
KMessageBox
::
sorry
(
this
,
i18n
(
"You must define a tag name."
),
"Cervisia"
);
KMessageBox
::
error
(
this
,
i18n
(
"You must define a tag name."
),
"Cervisia"
);
return
;
}
if
(
!
Cervisia
::
IsValidTag
(
str
))
{
KMessageBox
::
sorry
(
this
,
KMessageBox
::
error
(
this
,
i18n
(
"Tag must start with a letter and may contain "
"letters, digits and the characters '-' and '_'."
),
"Cervisia"
);
...
...
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