Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JuK
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
Multimedia
JuK
Commits
3f8260c7
Commit
3f8260c7
authored
Sep 15, 2006
by
Dirk Mueller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt3support--
svn path=/trunk/KDE/kdemultimedia/juk/; revision=584892
parent
827240bf
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
53 additions
and
46 deletions
+53
-46
collectionlist.cpp
collectionlist.cpp
+4
-4
coverdialog.cpp
coverdialog.cpp
+2
-2
coverinfo.cpp
coverinfo.cpp
+2
-2
covermanager.cpp
covermanager.cpp
+3
-3
filehandle.cpp
filehandle.cpp
+1
-1
googlefetcherdialog.cpp
googlefetcherdialog.cpp
+1
-1
ktrm.cpp
ktrm.cpp
+1
-1
nowplaying.cpp
nowplaying.cpp
+2
-1
playlist.cpp
playlist.cpp
+3
-3
playlistbox.cpp
playlistbox.cpp
+1
-1
playlistitem.cpp
playlistitem.cpp
+2
-2
playlistsearch.cpp
playlistsearch.cpp
+1
-1
playlistsplitter.cpp
playlistsplitter.cpp
+2
-1
splashscreen.cpp
splashscreen.cpp
+1
-1
tageditor.cpp
tageditor.cpp
+10
-10
tageditor.h
tageditor.h
+1
-1
tagguesser.cpp
tagguesser.cpp
+2
-2
tagguessertest.cpp
tagguessertest.cpp
+11
-6
tagrenameroptions.cpp
tagrenameroptions.cpp
+1
-1
trackpickerdialog.cpp
trackpickerdialog.cpp
+1
-1
viewmode.cpp
viewmode.cpp
+1
-1
No files found.
collectionlist.cpp
View file @
3f8260c7
...
...
@@ -367,7 +367,7 @@ void CollectionListItem::refresh()
if
(
id
!=
TrackNumberColumn
&&
id
!=
LengthColumn
)
{
// All columns other than track num and length need local-encoded data for sorting
QByteArray
lower
=
text
(
i
).
l
ower
().
local8Bit
();
QByteArray
toLower
=
text
(
i
).
toL
ower
().
local8Bit
();
// For some columns, we may be able to share some strings
...
...
@@ -375,15 +375,15 @@ void CollectionListItem::refresh()
(
id
==
GenreColumn
)
||
(
id
==
YearColumn
)
||
(
id
==
CommentColumn
))
{
lower
=
StringShare
::
tryShare
(
l
ower
);
toLower
=
StringShare
::
tryShare
(
toL
ower
);
if
(
id
!=
YearColumn
&&
id
!=
CommentColumn
&&
data
()
->
local8Bit
[
id
]
!=
l
ower
)
{
if
(
id
!=
YearColumn
&&
id
!=
CommentColumn
&&
data
()
->
local8Bit
[
id
]
!=
toL
ower
)
{
CollectionList
::
instance
()
->
removeStringFromDict
(
data
()
->
local8Bit
[
id
],
id
);
CollectionList
::
instance
()
->
addStringToDict
(
text
(
i
),
id
);
}
}
data
()
->
local8Bit
[
id
]
=
l
ower
;
data
()
->
local8Bit
[
id
]
=
toL
ower
;
}
int
newWidth
=
width
(
listView
()
->
fontMetrics
(),
listView
(),
i
);
...
...
coverdialog.cpp
View file @
3f8260c7
...
...
@@ -58,7 +58,7 @@ public:
int
compare
(
Q3ListViewItem
*
item
,
int
column
,
bool
ascending
)
const
{
Q_UNUSED
(
ascending
);
return
text
(
column
).
lower
().
localeAwareCompare
(
item
->
text
(
column
).
l
ower
());
return
text
(
column
).
toLower
().
localeAwareCompare
(
item
->
text
(
column
).
toL
ower
());
}
};
...
...
@@ -123,7 +123,7 @@ void CoverDialog::slotArtistClicked(Q3ListViewItem *item)
loadCovers
();
}
else
{
QString
artist
=
item
->
text
(
0
).
l
ower
();
QString
artist
=
item
->
text
(
0
).
toL
ower
();
Q3ValueList
<
coverKey
>
keys
=
CoverManager
::
keys
();
Q3ValueList
<
coverKey
>::
ConstIterator
it
;
...
...
coverinfo.cpp
View file @
3f8260c7
...
...
@@ -39,7 +39,7 @@
struct
CoverPopup
:
public
QWidget
{
CoverPopup
(
const
QPixmap
&
image
,
const
QPoint
&
p
)
:
QWidget
(
0
,
0
,
Qt
::
WDestructiveClose
|
Qt
::
WX11BypassWM
)
QWidget
(
0
,
Qt
::
WDestructiveClose
|
Qt
::
WX11BypassWM
)
{
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
QLabel
*
label
=
new
QLabel
(
this
);
...
...
@@ -246,7 +246,7 @@ QString CoverInfo::coverLocation(CoverSize size) const
default:
break
;
}
QString
fileLocation
=
dataDir
+
"covers/"
+
subDir
+
fileName
.
l
ower
();
QString
fileLocation
=
dataDir
+
"covers/"
+
subDir
+
fileName
.
toL
ower
();
return
fileLocation
;
}
...
...
covermanager.cpp
View file @
3f8260c7
...
...
@@ -325,7 +325,7 @@ coverKey CoverManager::idFromMetadata(const QString &artist, const QString &albu
CoverDataMap
::
ConstIterator
endIt
=
end
();
for
(;
it
!=
endIt
;
++
it
)
{
if
(
it
.
data
()
->
album
==
album
.
lower
()
&&
it
.
data
()
->
artist
==
artist
.
l
ower
())
if
(
it
.
data
()
->
album
==
album
.
toLower
()
&&
it
.
data
()
->
artist
==
artist
.
toL
ower
())
return
it
.
key
();
}
...
...
@@ -408,8 +408,8 @@ coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, con
return
NoMatch
;
}
coverData
->
artist
=
artist
.
l
ower
();
coverData
->
album
=
album
.
l
ower
();
coverData
->
artist
=
artist
.
toL
ower
();
coverData
->
album
=
album
.
toL
ower
();
coverData
->
refCount
=
0
;
data
()
->
covers
[
id
]
=
coverData
;
...
...
filehandle.cpp
View file @
3f8260c7
...
...
@@ -244,7 +244,7 @@ QStringList FileHandle::properties() // static
QString
FileHandle
::
property
(
const
QString
&
name
)
const
{
return
FileHandleProperties
::
property
(
*
this
,
name
.
latin1
());
return
FileHandleProperties
::
property
(
*
this
,
name
.
toAscii
());
}
const
FileHandle
&
FileHandle
::
null
()
// static
...
...
googlefetcherdialog.cpp
View file @
3f8260c7
...
...
@@ -41,7 +41,7 @@ GoogleFetcherDialog::GoogleFetcherDialog(const QString &name,
m_newSearch
(
false
),
m_file
(
file
)
{
setObjectName
(
name
.
latin1
());
setObjectName
(
name
.
toAscii
());
setModal
(
true
);
setCaption
(
QString
::
null
);
setButtons
(
Ok
|
Cancel
|
User1
);
...
...
ktrm.cpp
View file @
3f8260c7
...
...
@@ -182,7 +182,7 @@ protected:
QString
proxyHost
=
proxy
.
host
();
kDebug
(
65432
)
<<
"Using proxy server "
<<
proxyHost
<<
" for www.musicbrainz.org.
\n
"
;
tp_SetProxy
(
m_pimp
,
proxyHost
.
latin1
(),
short
(
proxy
.
port
()));
tp_SetProxy
(
m_pimp
,
proxyHost
.
toAscii
(),
short
(
proxy
.
port
()));
}
}
}
...
...
nowplaying.cpp
View file @
3f8260c7
...
...
@@ -225,9 +225,10 @@ void CoverItem::dropEvent(QDropEvent *e)
////////////////////////////////////////////////////////////////////////////////
TrackItem
::
TrackItem
(
NowPlaying
*
parent
)
:
QWidget
(
parent
,
"TrackItem"
),
QWidget
(
parent
),
NowPlayingItem
(
parent
)
{
setObjectName
(
"TrackItem"
);
setFixedHeight
(
parent
->
height
()
-
parent
->
layout
()
->
margin
()
*
2
);
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Fixed
);
...
...
playlist.cpp
View file @
3f8260c7
...
...
@@ -1208,7 +1208,7 @@ void Playlist::contentsDropEvent(QDropEvent *e)
return
;
}
// When dropping on the
u
pper half of an item, insert before this item.
// When dropping on the
toU
pper half of an item, insert before this item.
// This is what the user expects, and also allows the insertion at
// top of the list
...
...
@@ -1856,7 +1856,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl
// We set importPlaylists to the value from the add directories
// dialog as we want to load all of the ones that the user has
// explicitly asked for, but not those that we find in
l
ower
// explicitly asked for, but not those that we find in
toL
ower
// directories.
addFile
(
fileInfo
.
filePath
()
+
QDir
::
separator
()
+
QFile
::
decodeName
(
dirEntry
->
d_name
),
...
...
@@ -1958,7 +1958,7 @@ void Playlist::slotUpdateColumnWidths()
// Make sure that the width won't get any smaller than this. We have to
// account for the scrollbar as well. Since this method is called from the
// resize event this will set a pretty hard
l
ower bound on the size.
// resize event this will set a pretty hard
toL
ower bound on the size.
setMinimumWidth
(
minimumWidthTotal
+
verticalScrollBar
()
->
width
());
...
...
playlistbox.cpp
View file @
3f8260c7
...
...
@@ -734,7 +734,7 @@ int PlaylistBox::Item::compare(Q3ListViewItem *i, int col, bool) const
else
if
(
otherItem
->
m_sortedFirst
&&
!
m_sortedFirst
)
return
1
;
return
text
(
col
).
lower
().
localeAwareCompare
(
i
->
text
(
col
).
l
ower
());
return
text
(
col
).
toLower
().
localeAwareCompare
(
i
->
text
(
col
).
toL
ower
());
}
void
PlaylistBox
::
Item
::
paintCell
(
QPainter
*
painter
,
const
QColorGroup
&
colorGroup
,
int
column
,
int
width
,
int
align
)
...
...
playlistitem.cpp
View file @
3f8260c7
...
...
@@ -335,8 +335,8 @@ int PlaylistItem::compare(const PlaylistItem *firstItem, const PlaylistItem *sec
return
0
;
if
(
column
<
offset
)
{
QString
first
=
firstItem
->
text
(
column
).
l
ower
();
QString
second
=
secondItem
->
text
(
column
).
l
ower
();
QString
first
=
firstItem
->
text
(
column
).
toL
ower
();
QString
second
=
secondItem
->
text
(
column
).
toL
ower
();
return
first
.
localeAwareCompare
(
second
);
}
...
...
playlistsearch.cpp
View file @
3f8260c7
...
...
@@ -213,7 +213,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
if
(
item
->
text
(
*
it
)
==
m_query
)
return
true
;
}
else
if
(
item
->
text
(
*
it
).
lower
()
==
m_query
.
l
ower
())
else
if
(
item
->
text
(
*
it
).
toLower
()
==
m_query
.
toL
ower
())
return
true
;
}
break
;
...
...
playlistsplitter.cpp
View file @
3f8260c7
...
...
@@ -147,7 +147,8 @@ void PlaylistSplitter::setupLayout()
connect
(
m_playlistStack
,
SIGNAL
(
aboutToShow
(
QWidget
*
)),
this
,
SLOT
(
slotPlaylistChanged
(
QWidget
*
)));
m_editor
=
new
TagEditor
(
editorSplitter
,
"tagEditor"
);
m_editor
=
new
TagEditor
(
editorSplitter
);
m_editor
->
setObjectName
(
"TagEditor"
);
// Make the editor as small as possible (or at least as small as recommended)
...
...
splashscreen.cpp
View file @
3f8260c7
...
...
@@ -32,7 +32,7 @@ int SplashScreen::count = 0;
static
QString
loadedText
(
int
i
)
{
static
QString
loading
=
i18n
(
"Loading"
).
u
pper
();
static
QString
loading
=
i18n
(
"Loading"
).
toU
pper
();
return
loading
+
": "
+
QString
::
number
(
i
);;
}
...
...
tageditor.cpp
View file @
3f8260c7
...
...
@@ -148,8 +148,8 @@ private:
// public members
////////////////////////////////////////////////////////////////////////////////
TagEditor
::
TagEditor
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
,
name
),
TagEditor
::
TagEditor
(
QWidget
*
parent
)
:
QWidget
(
parent
),
m_currentPlaylist
(
0
),
m_observer
(
0
),
m_performingSave
(
false
)
...
...
@@ -492,7 +492,7 @@ void TagEditor::saveConfig()
void
TagEditor
::
setupActions
()
{
KToggleAction
*
show
=
new
KToggleAction
(
KIcon
(
"edit"
),
i18n
(
"Show &Tag Editor"
),
ActionCollection
::
actions
(),
"showEditor"
);
show
->
setCheckedState
(
i18n
(
"Hide &Tag Editor"
));
show
->
setCheckedState
(
KGuiItem
(
i18n
(
"Hide &Tag Editor"
)
));
connect
(
show
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
setShown
(
bool
)));
KAction
*
act
=
new
KAction
(
KIcon
(
"filesave"
),
i18n
(
"&Save"
),
ActionCollection
::
actions
(),
"saveItem"
);
...
...
@@ -699,26 +699,26 @@ void TagEditor::save(const PlaylistItemList &list)
// files. We have to check to see if that is enabled before
// each field that we write.
if
(
m_enableBoxes
[
m_artistNameBox
]
->
is
On
())
if
(
m_enableBoxes
[
m_artistNameBox
]
->
is
Checked
())
tag
->
setArtist
(
m_artistNameBox
->
currentText
());
if
(
m_enableBoxes
[
m_trackNameBox
]
->
is
On
())
if
(
m_enableBoxes
[
m_trackNameBox
]
->
is
Checked
())
tag
->
setTitle
(
m_trackNameBox
->
text
());
if
(
m_enableBoxes
[
m_albumNameBox
]
->
is
On
())
if
(
m_enableBoxes
[
m_albumNameBox
]
->
is
Checked
())
tag
->
setAlbum
(
m_albumNameBox
->
currentText
());
if
(
m_enableBoxes
[
m_trackSpin
]
->
is
On
())
{
if
(
m_enableBoxes
[
m_trackSpin
]
->
is
Checked
())
{
if
(
m_trackSpin
->
text
().
isEmpty
())
m_trackSpin
->
setValue
(
0
);
tag
->
setTrack
(
m_trackSpin
->
value
());
}
if
(
m_enableBoxes
[
m_yearSpin
]
->
is
On
())
{
if
(
m_enableBoxes
[
m_yearSpin
]
->
is
Checked
())
{
if
(
m_yearSpin
->
text
().
isEmpty
())
m_yearSpin
->
setValue
(
0
);
tag
->
setYear
(
m_yearSpin
->
value
());
}
if
(
m_enableBoxes
[
m_commentBox
]
->
is
On
())
if
(
m_enableBoxes
[
m_commentBox
]
->
is
Checked
())
tag
->
setComment
(
m_commentBox
->
toPlainText
());
if
(
m_enableBoxes
[
m_genreBox
]
->
is
On
())
if
(
m_enableBoxes
[
m_genreBox
]
->
is
Checked
())
tag
->
setGenre
(
m_genreBox
->
currentText
());
TagTransactionManager
::
instance
()
->
changeTagOnItem
(
item
,
tag
);
...
...
tageditor.h
View file @
3f8260c7
...
...
@@ -44,7 +44,7 @@ class TagEditor : public QWidget
Q_OBJECT
public:
TagEditor
(
QWidget
*
parent
=
0
,
const
char
*
name
=
0
);
TagEditor
(
QWidget
*
parent
=
0
);
virtual
~
TagEditor
();
PlaylistItemList
items
()
const
{
return
m_items
;
}
void
setupObservers
();
...
...
tagguesser.cpp
View file @
3f8260c7
...
...
@@ -202,12 +202,12 @@ QString TagGuesser::capitalizeWords(const QString &s)
return
s
;
QString
result
=
s
;
result
[
0
]
=
result
[
0
].
u
pper
();
result
[
0
]
=
result
[
0
].
toU
pper
();
const
QRegExp
wordRegExp
(
"
\\
s
\\
w"
);
int
i
=
result
.
indexOf
(
wordRegExp
);
while
(
i
>
-
1
)
{
result
[
i
+
1
]
=
result
[
i
+
1
].
u
pper
();
result
[
i
+
1
]
=
result
[
i
+
1
].
toU
pper
();
i
=
result
.
indexOf
(
wordRegExp
,
++
i
);
}
...
...
tagguessertest.cpp
View file @
3f8260c7
...
...
@@ -37,26 +37,31 @@ void check( const QString &filename, const QString &title,
const
QString
&
artist
,
const
QString
&
track
,
const
QString
&
comment
,
const
QString
&
album
=
QString
::
null
)
{
cout
<<
"Checking "
<<
filename
.
latin1
(
)
<<
"..."
;
cout
<<
"Checking "
<<
qPrintable
(
filename
)
<<
"..."
;
TagGuesser
guesser
(
filename
);
if
(
guesser
.
title
()
!=
title
)
{
cout
<<
"Error: In filename "
<<
filename
.
latin1
()
<<
", expected title "
<<
title
.
latin1
()
<<
", got title "
<<
guesser
.
title
().
latin1
()
<<
endl
;
cout
<<
"Error: In filename "
<<
qPrintable
(
filename
)
<<
", expected title "
<<
qPrintable
(
title
)
<<
", got title "
<<
qPrintable
(
guesser
.
title
())
<<
endl
;
exit
(
1
);
}
if
(
guesser
.
artist
()
!=
artist
)
{
cout
<<
"Error: In filename "
<<
filename
.
latin1
()
<<
", expected artist "
<<
artist
.
latin1
()
<<
", got artist "
<<
guesser
.
artist
().
latin1
()
<<
endl
;
cout
<<
"Error: In filename "
<<
qPrintable
(
filename
)
<<
", expected artist "
<<
qPrintable
(
artist
)
<<
", got artist "
<<
qPrintable
(
guesser
.
artist
())
<<
endl
;
exit
(
1
);
}
if
(
guesser
.
track
()
!=
track
)
{
cout
<<
"Error: In filename "
<<
filename
.
latin1
()
<<
", expected track "
<<
track
.
latin1
()
<<
", got track "
<<
guesser
.
track
().
latin1
()
<<
endl
;
cout
<<
"Error: In filename "
<<
qPrintable
(
filename
)
<<
", expected track "
<<
qPrintable
(
track
)
<<
", got track "
<<
qPrintable
(
guesser
.
track
())
<<
endl
;
exit
(
1
);
}
if
(
guesser
.
comment
()
!=
comment
)
{
cout
<<
"Error: In filename "
<<
filename
.
latin1
()
<<
", expected comment "
<<
comment
.
latin1
()
<<
", got comment "
<<
guesser
.
comment
().
latin1
()
<<
endl
;
cout
<<
"Error: In filename "
<<
qPrintable
(
filename
)
<<
", expected comment "
<<
qPrintable
(
comment
)
<<
", got comment "
<<
qPrintable
(
guesser
.
comment
())
<<
endl
;
exit
(
1
);
}
if
(
guesser
.
album
()
!=
album
)
{
cout
<<
"Error: In filename "
<<
filename
.
latin1
()
<<
", expected album "
<<
album
.
latin1
()
<<
", got album "
<<
guesser
.
album
().
latin1
()
<<
endl
;
cout
<<
"Error: In filename "
<<
qPrintable
(
filename
)
<<
", expected album "
<<
qPrintable
(
album
)
<<
", got album "
<<
qPrintable
(
guesser
.
album
())
<<
endl
;
exit
(
1
);
}
cout
<<
"OK"
<<
endl
;
...
...
tagrenameroptions.cpp
View file @
3f8260c7
...
...
@@ -72,7 +72,7 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category)
// Default the emptyAction to ignoring the empty tag.
const
QString
emptyAction
=
config
.
readEntry
(
QString
(
"%1EmptyAction"
).
arg
(
typeKey
),
QString
()).
l
ower
();
const
QString
emptyAction
=
config
.
readEntry
(
QString
(
"%1EmptyAction"
).
arg
(
typeKey
),
QString
()).
toL
ower
();
setEmptyAction
(
IgnoreEmptyTag
);
if
(
emptyAction
==
"forceemptyinclude"
)
...
...
trackpickerdialog.cpp
View file @
3f8260c7
...
...
@@ -50,7 +50,7 @@ TrackPickerDialog::TrackPickerDialog(const QString &name,
QWidget
*
parent
)
:
KDialog
(
parent
)
{
setObjectName
(
name
.
latin1
());
setObjectName
(
name
.
toAscii
());
setModal
(
true
);
setCaption
(
i18n
(
"Internet Tag Guesser"
));
setButtons
(
Ok
|
Cancel
);
...
...
viewmode.cpp
View file @
3f8260c7
...
...
@@ -184,7 +184,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
int
width
)
{
// Here 32 is a bit arbitrary, but that's the width of the icons in this
// mode and seems to a reasonable
l
ower bound.
// mode and seems to a reasonable
toL
ower bound.
if
(
width
<
32
)
return
QStringList
();
...
...
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