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
Multimedia
K3b
Commits
e14a9c58
Commit
e14a9c58
authored
Dec 09, 2019
by
Laurent Montel
😁
Browse files
Port some deprecated methods
parent
6ce3dc13
Changes
18
Hide whitespace changes
Inline
Side-by-side
libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp
View file @
e14a9c58
...
...
@@ -26,6 +26,7 @@
#include
<QDebug>
#include
<QIODevice>
#include
<QScopedPointer>
#include
<QElapsedTimer>
class
K3b
::
AudioMaxSpeedJob
::
Private
...
...
@@ -59,7 +60,7 @@ int K3b::AudioMaxSpeedJob::Private::speedTest( K3b::AudioDataSource* source, QIO
}
}
QTime
t
;
Q
Elapsed
Time
r
t
;
qint64
dataRead
=
0
;
qint64
r
=
0
;
...
...
libk3b/projects/datacd/k3bdatajob.cpp
View file @
e14a9c58
...
...
@@ -180,7 +180,7 @@ void K3b::DataJob::prepareWriting()
if
(
writingApp
()
==
K3b
::
WritingAppCdrdao
)
{
nextSessionStart
+=
150
;
}
m_isoImager
->
setMultiSessionInfo
(
QString
().
sprintf
(
"%u,%u"
,
m_isoImager
->
setMultiSessionInfo
(
QString
::
a
sprintf
(
"%u,%u"
,
d
->
multiSessionParameterJob
->
previousSessionStart
(),
nextSessionStart
),
d
->
multiSessionParameterJob
->
importPreviousSession
()
?
d
->
doc
->
burner
()
:
0
);
...
...
libk3b/projects/datacd/k3bdiritem.cpp
View file @
e14a9c58
...
...
@@ -499,7 +499,7 @@ void K3b::DirItem::addDataItemImpl( DataItem* item )
K3b
::
RootItem
::
RootItem
(
K3b
::
DataDoc
&
doc
)
:
K3b
::
DirItem
(
"root"
,
0
),
:
K3b
::
DirItem
(
"root"
),
m_doc
(
doc
)
{
}
...
...
libk3b/projects/datacd/k3bmsinfofetcher.cpp
View file @
e14a9c58
...
...
@@ -144,7 +144,7 @@ void K3b::MsInfoFetcher::slotMediaDetectionFinished( K3b::Device::DeviceHandler*
nextSession
+=
15
;
nextSession
/=
16
;
nextSession
*=
16
;
m_msInfo
.
sprintf
(
"16,%llu"
,
nextSession
);
m_msInfo
=
QString
::
a
sprintf
(
"16,%llu"
,
nextSession
);
jobFinished
(
true
);
}
...
...
libk3b/tools/k3blibdvdcss.cpp
View file @
e14a9c58
...
...
@@ -211,9 +211,9 @@ bool K3b::LibDvdCss::crackAllKeys()
// first we get the menu vob
if
(
title
==
0
)
filename
.
sprintf
(
"VIDEO_TS/VIDEO_TS.VOB"
);
filename
=
QLatin1String
(
"VIDEO_TS/VIDEO_TS.VOB"
);
else
filename
.
sprintf
(
"VIDEO_TS/VTS_%02d_%d.VOB"
,
title
,
0
);
filename
=
QString
::
a
sprintf
(
"VIDEO_TS/VTS_%02d_%d.VOB"
,
title
,
0
);
const
K3b
::
Iso9660File
*
file
=
dynamic_cast
<
const
K3b
::
Iso9660File
*>
(
dir
->
entry
(
filename
)
);
if
(
file
&&
file
->
size
()
>
0
)
{
...
...
@@ -228,7 +228,7 @@ bool K3b::LibDvdCss::crackAllKeys()
QPair
<
int
,
int
>
p
;
int
vob
=
1
;
for
(
;
vob
<
100
;
++
vob
)
{
filename
.
sprintf
(
"VIDEO_TS/VTS_%02d_%d.VOB"
,
title
,
vob
);
filename
=
QString
::
a
sprintf
(
"VIDEO_TS/VTS_%02d_%d.VOB"
,
title
,
vob
);
file
=
dynamic_cast
<
const
K3b
::
Iso9660File
*>
(
dir
->
entry
(
filename
)
);
if
(
file
)
{
if
(
file
->
size
()
%
2048
)
...
...
libk3b/tools/k3bmsfedit.cpp
View file @
e14a9c58
...
...
@@ -111,7 +111,7 @@ QSize K3b::MsfEdit::sizeHint() const
const
QFontMetrics
fm
(
fontMetrics
());
int
h
=
lineEdit
()
->
sizeHint
().
height
();
int
w
=
fm
.
width
(
lineEdit
()
->
inputMask
()
);
int
w
=
fm
.
boundingRect
(
lineEdit
()
->
inputMask
()
).
width
(
);
w
+=
2
;
// cursor blinking space
QStyleOptionSpinBox
opt
;
...
...
libk3b/tools/k3bthroughputestimator.cpp
View file @
e14a9c58
...
...
@@ -17,7 +17,7 @@
#include
<QDateTime>
#include
<QDebug>
#include
<QElapsedTimer>
class
K3b
::
ThroughputEstimator
::
Private
{
...
...
@@ -26,9 +26,9 @@ public:
:
started
(
false
)
{
}
QTime
firstDataTime
;
Q
Elapsed
Time
r
firstDataTime
;
unsigned
long
firstData
;
QTime
lastDataTime
;
Q
Elapsed
Time
r
lastDataTime
;
unsigned
long
lastData
;
int
lastThroughput
;
...
...
libk3b/tools/k3btitlelabel.cpp
View file @
e14a9c58
...
...
@@ -202,7 +202,7 @@ void K3b::TitleLabel::updatePositioning()
QFontMetrics
subTitleFm
(
f
);
d
->
titleBaseLine
=
contentsRect
().
height
()
/
2
+
titleFm
.
height
()
/
2
-
titleFm
.
descent
();
d
->
titleLength
=
titleFm
.
width
(
d
->
title
);
d
->
titleLength
=
titleFm
.
boundingRect
(
d
->
title
).
width
(
);
d
->
subTitleBaseLine
=
d
->
titleBaseLine
;
...
...
libk3b/tools/qprocess/k3bqprocess.cpp
View file @
e14a9c58
...
...
@@ -40,7 +40,7 @@
****************************************************************************/
//#define QPROCESS_DEBUG
#include
<QElapsedTimer>
#if defined QPROCESS_DEBUG
#include
<qdebug.h>
#include
<QString>
...
...
@@ -1380,7 +1380,7 @@ bool K3bQProcess::waitForBytesWritten(int msecs)
if
(
d
->
processState
==
::
QProcess
::
NotRunning
)
return
false
;
if
(
d
->
processState
==
::
QProcess
::
Starting
)
{
QTime
stopWatch
;
Q
Elapsed
Time
r
stopWatch
;
stopWatch
.
start
();
bool
started
=
waitForStarted
(
msecs
);
if
(
!
started
)
...
...
@@ -1416,7 +1416,7 @@ bool K3bQProcess::waitForFinished(int msecs)
if
(
d
->
processState
==
::
QProcess
::
NotRunning
)
return
false
;
if
(
d
->
processState
==
::
QProcess
::
Starting
)
{
QTime
stopWatch
;
Q
Elapsed
Time
r
stopWatch
;
stopWatch
.
start
();
bool
started
=
waitForStarted
(
msecs
);
if
(
!
started
)
...
...
libk3b/tools/qprocess/k3bqprocess_unix.cpp
View file @
e14a9c58
...
...
@@ -41,7 +41,7 @@
//#define QPROCESS_DEBUG
#include
"qdebug.h"
#include
<QElapsedTimer>
#ifndef QT_NO_PROCESS
#if defined QPROCESS_DEBUG
...
...
@@ -1002,7 +1002,7 @@ bool K3bQProcessPrivate::waitForReadyRead(int msecs)
qDebug
(
"K3bQProcessPrivate::waitForReadyRead(%d)"
,
msecs
);
#endif
QTime
stopWatch
;
Q
Elapsed
Time
r
stopWatch
;
stopWatch
.
start
();
forever
{
...
...
@@ -1078,7 +1078,7 @@ bool K3bQProcessPrivate::waitForBytesWritten(int msecs)
if
(
processFlags
&
K3bQProcess
::
RawStdin
)
return
true
;
QTime
stopWatch
;
Q
Elapsed
Time
r
stopWatch
;
stopWatch
.
start
();
while
(
!
writeBuffer
.
isEmpty
())
{
...
...
@@ -1145,7 +1145,7 @@ bool K3bQProcessPrivate::waitForFinished(int msecs)
qDebug
(
"K3bQProcessPrivate::waitForFinished(%d)"
,
msecs
);
#endif
QTime
stopWatch
;
Q
Elapsed
Time
r
stopWatch
;
stopWatch
.
start
();
forever
{
...
...
libk3b/videodvd/k3bvideodvdtime.cpp
View file @
e14a9c58
...
...
@@ -65,13 +65,13 @@ unsigned int K3b::VideoDVD::Time::totalFrames() const
QString
K3b
::
VideoDVD
::
Time
::
toString
(
bool
includeFrames
)
const
{
if
(
includeFrames
)
return
QString
().
sprintf
(
"%02d:%02d:%02d.%02d"
,
return
QString
::
a
sprintf
(
"%02d:%02d:%02d.%02d"
,
hour
(),
minute
(),
second
(),
frame
()
);
else
return
QString
().
sprintf
(
"%02d:%02d:%02d"
,
return
QString
::
a
sprintf
(
"%02d:%02d:%02d"
,
hour
(),
minute
(),
second
()
+
(
frame
()
>
0
?
1
:
0
)
);
...
...
libk3bdevice/k3bdevice.cpp
View file @
e14a9c58
...
...
@@ -258,7 +258,7 @@ K3b::Device::Device::Device( const Solid::Device& dev )
else
d
->
blockDevice
=
dev
.
as
<
Solid
::
Block
>
()
->
device
();
#endif
d
->
writeModes
=
0
;
d
->
writeModes
=
{}
;
d
->
maxWriteSpeed
=
0
;
d
->
maxReadSpeed
=
0
;
d
->
burnfree
=
false
;
...
...
@@ -356,7 +356,7 @@ Solid::StorageAccess* K3b::Device::Device::solidStorage() const
{
QList
<
Solid
::
Device
>
storages
=
Solid
::
Device
::
listFromType
(
Solid
::
DeviceInterface
::
StorageAccess
,
d
->
solidDevice
.
udi
()
);
if
(
storages
.
isEmpty
()
)
return
0
;
return
nullptr
;
else
return
storages
.
first
().
as
<
Solid
::
StorageAccess
>
();
}
...
...
@@ -370,8 +370,8 @@ bool K3b::Device::Device::init( bool bCheckWritingModes )
// they all should read CD-ROM.
//
d
->
readCapabilities
=
MEDIA_CD_ROM
;
d
->
writeCapabilities
=
0
;
d
->
supportedProfiles
=
0
;
d
->
writeCapabilities
=
{}
;
d
->
supportedProfiles
=
{}
;
if
(
!
open
()
)
return
false
;
...
...
@@ -651,7 +651,7 @@ bool K3b::Device::Device::readsDvd() const
K3b
::
Device
::
DeviceTypes
K3b
::
Device
::
Device
::
type
()
const
{
DeviceTypes
r
=
0
;
DeviceTypes
r
=
{}
;
if
(
readCapabilities
()
&
MEDIA_CD_ROM
)
r
|=
DEVICE_CD_ROM
;
if
(
writeCapabilities
()
&
MEDIA_CD_R
)
...
...
@@ -3663,7 +3663,7 @@ QByteArray K3b::Device::Device::mediaId( int mediaType ) const
UByteArray
data
;
if
(
readDvdStructure
(
data
,
0x0E
)
)
{
if
(
data
[
4
+
16
]
==
3
&&
data
[
4
+
24
]
==
4
)
{
id
.
sprintf
(
"%6.6s%-6.6s"
,
data
.
data
()
+
4
+
17
,
data
.
data
()
+
4
+
25
);
id
=
QString
::
a
sprintf
(
"%6.6s%-6.6s"
,
data
.
data
()
+
4
+
17
,
data
.
data
()
+
4
+
25
);
}
}
}
...
...
@@ -3672,7 +3672,7 @@ QByteArray K3b::Device::Device::mediaId( int mediaType ) const
UByteArray
data
;
if
(
readDvdStructure
(
data
,
0x11
)
||
readDvdStructure
(
data
,
0x0
)
)
{
id
.
sprintf
(
"%8.8s/%3.3s"
,
data
.
data
()
+
23
,
data
.
data
()
+
31
);
id
=
QString
::
a
sprintf
(
"%8.8s/%3.3s"
,
data
.
data
()
+
23
,
data
.
data
()
+
31
);
}
}
...
...
@@ -3680,7 +3680,7 @@ QByteArray K3b::Device::Device::mediaId( int mediaType ) const
UByteArray
data
;
if
(
readDiscStructure
(
data
,
1
,
0
)
)
{
if
(
data
[
4
+
0
]
==
'D'
&&
data
[
4
+
1
]
==
'I'
)
id
.
sprintf
(
"%6.6s/%-3.3s"
,
data
.
data
()
+
4
+
100
,
data
.
data
()
+
4
+
106
);
id
=
QString
::
a
sprintf
(
"%6.6s/%-3.3s"
,
data
.
data
()
+
4
+
100
,
data
.
data
()
+
4
+
106
);
}
}
...
...
libk3bdevice/k3bdeviceglobals.cpp
View file @
e14a9c58
...
...
@@ -204,7 +204,7 @@ void K3b::Device::debugBitfield( unsigned char* data, long len )
{
for
(
int
i
=
0
;
i
<
len
;
++
i
)
{
QString
index
,
bitString
;
index
.
sprintf
(
"%4i"
,
i
);
index
=
QString
::
a
sprintf
(
"%4i"
,
i
);
for
(
int
bp
=
7
;
bp
>=
0
;
--
bp
)
bitString
[
7
-
bp
]
=
(
data
[
i
]
&
(
1
<<
bp
)
?
'1'
:
'0'
);
qDebug
()
<<
index
<<
" - "
<<
bitString
<<
" - "
<<
(
int
)
data
[
i
];
...
...
libk3bdevice/k3bmsf.cpp
View file @
e14a9c58
...
...
@@ -235,9 +235,9 @@ QString K3b::Msf::toString( bool showFrames ) const
QString
str
;
if
(
showFrames
)
str
.
sprintf
(
"%.2i:%.2i:%.2i"
,
d
->
minutes
,
d
->
seconds
,
d
->
frames
);
str
=
QString
::
a
sprintf
(
"%.2i:%.2i:%.2i"
,
d
->
minutes
,
d
->
seconds
,
d
->
frames
);
else
str
.
sprintf
(
"%.2i:%.2i"
,
d
->
minutes
,
d
->
seconds
);
str
=
QString
::
a
sprintf
(
"%.2i:%.2i"
,
d
->
minutes
,
d
->
seconds
);
return
str
;
}
...
...
src/misc/k3bmediacopydialog.cpp
View file @
e14a9c58
...
...
@@ -475,7 +475,7 @@ void K3b::MediaCopyDialog::toggleAll()
// selection of the writing mode
//
if
(
burnDev
==
readDev
)
{
K3b
::
WritingModes
modes
=
0
;
K3b
::
WritingModes
modes
=
WritingModeAuto
;
if
(
sourceMedium
.
diskInfo
().
mediaType
()
&
K3b
::
Device
::
MEDIA_CD_ALL
)
{
modes
=
K3b
::
WritingModeTao
|
K3b
::
WritingModeSao
|
K3b
::
WritingModeRaw
;
}
...
...
src/misc/k3bmediaformattingdialog.cpp
View file @
e14a9c58
...
...
@@ -166,7 +166,7 @@ void K3b::MediaFormattingDialog::slotStartClicked()
void
K3b
::
MediaFormattingDialog
::
toggleAll
()
{
K3b
::
Medium
medium
=
k3bappcore
->
mediaCache
()
->
medium
(
m_writerSelectionWidget
->
writerDevice
()
);
K3b
::
WritingModes
modes
=
0
;
K3b
::
WritingModes
modes
=
WritingModeAuto
;
if
(
medium
.
diskInfo
().
mediaType
()
&
(
K3b
::
Device
::
MEDIA_DVD_RW
|
K3b
::
Device
::
MEDIA_DVD_RW_SEQ
|
K3b
::
Device
::
MEDIA_DVD_RW_OVWR
)
)
{
modes
|=
K3b
::
WritingModeIncrementalSequential
|
K3b
::
WritingModeRestrictedOverwrite
;
}
...
...
src/projects/k3bfillstatusdisplay.cpp
View file @
e14a9c58
...
...
@@ -215,7 +215,7 @@ void K3b::FillStatusDisplayWidget::paintEvent( QPaintEvent* )
// if there is not enough space we just align it left
// ====================================================================================
int
docSizeTextPos
=
0
;
int
docSizeTextLength
=
fontMetrics
().
width
(
docSizeText
);
int
docSizeTextLength
=
fontMetrics
().
boundingRect
(
docSizeText
)
.
width
()
;
if
(
docSizeTextLength
+
5
>
crect
.
width
()
)
{
docSizeTextPos
=
crect
.
left
()
+
5
;
// a little margin
}
...
...
@@ -234,7 +234,7 @@ void K3b::FillStatusDisplayWidget::paintEvent( QPaintEvent* )
overSizeFont
.
setBold
(
false
);
QRect
overSizeTextRect
(
barRect
);
int
overSizeTextLength
=
QFontMetrics
(
overSizeFont
).
width
(
overSizeText
);
int
overSizeTextLength
=
QFontMetrics
(
overSizeFont
).
boundingRect
(
overSizeText
)
.
width
()
;
if
(
overSizeTextLength
+
5
>
overSizeTextRect
.
width
()
-
(
int
)(
one
*
cdSize
.
totalFrames
())
)
{
// we don't have enough space on the right, so we paint to the left of the line
overSizeTextRect
.
setLeft
(
(
int
)(
one
*
cdSize
.
totalFrames
())
-
overSizeTextLength
-
5
);
...
...
src/projects/k3bvolumenamewidget.cpp
View file @
e14a9c58
...
...
@@ -38,7 +38,7 @@ public:
void
VolumeNameWidget
::
Private
::
fontChanged
(
const
QFontMetrics
&
fontMetrics
)
{
volumeNameEdit
->
setMaximumWidth
(
fontMetrics
.
width
(
'A'
)
*
50
);
volumeNameEdit
->
setMaximumWidth
(
fontMetrics
.
boundingRect
(
'A'
).
width
()
*
50
);
}
...
...
Write
Preview
Supports
Markdown
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