[prev in list] [next in list] [prev in thread] [next in thread]
List: amarok-devel
Subject: Re: Review Request: Get FileType of SQLTracks from Database instead
From: "Stefan Derkits" <stefan () derkits ! at>
Date: 2010-09-29 14:11:39
Message-ID: 20100929141139.16309.91044 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100004/
-----------------------------------------------------------
(Updated 2010-09-29 14:11:39.676725)
Review request for amarok.
Changes
-------
-) Initialize m_filetype in Constructor of SQLTrack (with Amarok::Unknown)
-) Moved the Method that returns a QString from a Filetype to FileType.h (d=
on't know if the Naming and making it "inline static" is good & correct)
It's a start and has some limitations, as it can only recognize the FileTyp=
es that were in FileType.h
e.g. previously the type of a file.wma returned "wma", now it returns "unkn=
own"
Anyways the other Filetypes need to be "implemented" so that they can be us=
ed elsewhere (e.g. in the Filter)
Summary
-------
-) Added a new Class Variable to SqlTrack to hold the FileType of a Track
-) Retrieve FileType from Database and save it in the Class Variable
-) Return a QString Representation of the Amarok::FileType when calling the=
Method SqlTrack::type()
Diffs (updated)
-----
src/core-impl/collections/sqlcollection/SqlMeta.h ee3ec21 =
src/core-impl/collections/sqlcollection/SqlMeta.cpp 2da0333 =
Diff: http://git.reviewboard.kde.org/r/100004/diff
Testing
-------
Hard to test, but the TagDialog displays the correct Filetypes
Wanted to test it with a Testcase where FileType in Database is different t=
hen the FileExtension but realized that only certain FileExtensions are rea=
d by the CollectionScanner/TagLib :)
So actually atm, the Code doesn't make much difference, but in my opinion t=
his is a cleaner (and more future proof) Solution to display the Filetype t=
hen just displaying the Extension of the File
Thanks,
Stefan
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/100004/">http://git.reviewboard.kde.org/r/100004/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for amarok.</div>
<div>By Stefan Derkits.</div>
<p style="color: grey;"><i>Updated 2010-09-29 14:11:39.676725</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">-) Initialize m_filetype in Constructor of SQLTrack (with \
Amarok::Unknown)
-) Moved the Method that returns a QString from a Filetype to FileType.h (don't \
know if the Naming and making it "inline static" is good & correct)
It's a start and has some limitations, as it can only recognize the FileTypes \
that were in FileType.h e.g. previously the type of a file.wma returned \
"wma", now it returns "unknown" Anyways the other Filetypes need \
to be "implemented" so that they can be used elsewhere (e.g. in the \
Filter)</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">-) Added a new Class Variable to SqlTrack to hold the FileType of a \
Track
-) Retrieve FileType from Database and save it in the Class Variable
-) Return a QString Representation of the Amarok::FileType when calling the Method \
SqlTrack::type()</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Hard to test, but the TagDialog displays the correct Filetypes Wanted to \
test it with a Testcase where FileType in Database is different then the \
FileExtension but realized that only certain FileExtensions are read by the \
CollectionScanner/TagLib :) So actually atm, the Code doesn't make much \
difference, but in my opinion this is a cleaner (and more future proof) Solution to \
display the Filetype then just displaying the Extension of the File</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>src/core-impl/collections/sqlcollection/SqlMeta.h <span style="color: \
grey">(ee3ec21)</span></li>
<li>src/core-impl/collections/sqlcollection/SqlMeta.cpp <span style="color: \
grey">(2da0333)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/100004/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic