projects
/
dorian
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ceb9de9
)
Fix author name in library and book info dialogs.
author
U-NOE\polster
<polster@4DKD01593.NOE.Nokia.com>
Mon, 6 Dec 2010 13:54:13 +0000
(14:54 +0100)
committer
U-NOE\polster
<polster@4DKD01593.NOE.Nokia.com>
Mon, 6 Dec 2010 13:54:13 +0000
(14:54 +0100)
infodialog.cpp
patch
|
blob
|
history
librarydialog.cpp
patch
|
blob
|
history
model/book.cpp
patch
|
blob
|
history
model/opshandler.h
patch
|
blob
|
history
model/sortedlibrary.cpp
patch
|
blob
|
history
pkg/changelog
patch
|
blob
|
history
diff --git
a/infodialog.cpp
b/infodialog.cpp
index
a9861c7
..
621eaaa
100644
(file)
--- a/
infodialog.cpp
+++ b/
infodialog.cpp
@@
-24,11
+24,7
@@
InfoDialog::InfoDialog(Book *b, QWidget *parent, bool showButtons):
if (book->creators.size()) {
QLabel *creators = new QLabel(this);
creators->setWordWrap(true);
if (book->creators.size()) {
QLabel *creators = new QLabel(this);
creators->setWordWrap(true);
- QString c = "By " + book->creators[0];
- for (int i = 1; i < book->creators.size(); i++) {
- c += ", " + book->creators[i];
- }
- creators->setText(c);
+ creators->setText(book->creators.join(", "));
addWidget(creators);
}
QLabel *path = new QLabel("File: " + book->path(), this);
addWidget(creators);
}
QLabel *path = new QLabel("File: " + book->path(), this);
diff --git
a/librarydialog.cpp
b/librarydialog.cpp
index
e45fe8f
..
cf48c48
100644
(file)
--- a/
librarydialog.cpp
+++ b/
librarydialog.cpp
@@
-16,14
+16,16
@@
#include "progressdialog.h"
#include "settings.h"
#include "progressdialog.h"
#include "settings.h"
-LibraryDialog::LibraryDialog(QWidget *parent): ListWindow(tr("(No books)"), parent)
+LibraryDialog::LibraryDialog(QWidget *parent):
+ ListWindow(tr("(No books)"), parent)
{
TRACE;
setWindowTitle(tr("Library"));
setAttribute(Qt::WA_DeleteOnClose, true);
// Add menu actions
{
TRACE;
setWindowTitle(tr("Library"));
setAttribute(Qt::WA_DeleteOnClose, true);
// Add menu actions
- sortByTitle = addMenuAction(tr("Sort by title"), this, SLOT(onSortByTitle()));
+ sortByTitle =
+ addMenuAction(tr("Sort by title"), this, SLOT(onSortByTitle()));
sortByAuthor =
addMenuAction(tr("Sort by author"), this, SLOT(onSortByAuthor()));
sortByAuthor =
addMenuAction(tr("Sort by author"), this, SLOT(onSortByAuthor()));
diff --git
a/model/book.cpp
b/model/book.cpp
index
89490d2
..
874ff2b
100644
(file)
--- a/
model/book.cpp
+++ b/
model/book.cpp
@@
-404,10
+404,7
@@
QString Book::name()
if (title.size()) {
QString ret = title;
if (creators.length()) {
if (title.size()) {
QString ret = title;
if (creators.length()) {
- ret += "\nBy " + creators[0];
- for (int i = 1; i < creators.length(); i++) {
- ret += ", " + creators[i];
- }
+ ret += "\nBy " + creators.join(", ");
}
return ret;
}
}
return ret;
}
diff --git
a/model/opshandler.h
b/model/opshandler.h
index
f764860
..
1d961c8
100644
(file)
--- a/
model/opshandler.h
+++ b/
model/opshandler.h
@@
-9,7
+9,9
@@
class OpsHandler: public XmlHandler
{
public:
class OpsHandler: public XmlHandler
{
public:
- OpsHandler(Book &b): book(b), partCount(0) {}
+ OpsHandler(Book &b): book(b), partCount(0) {
+ book.creators.clear();
+ }
bool endElement(const QString &namespaceUri, const QString &name,
const QString &qName) {
bool endElement(const QString &namespaceUri, const QString &name,
const QString &qName) {
diff --git
a/model/sortedlibrary.cpp
b/model/sortedlibrary.cpp
index
241dfe7
..
e1efd19
100644
(file)
--- a/
model/sortedlibrary.cpp
+++ b/
model/sortedlibrary.cpp
@@
-59,6
+59,7
@@
int SortedLibrary::compareBy(SortBy key, Book *left, Book *right) const
return QString::localeAwareCompare(left->creators.join(" "),
right->creators.join(" "));
default:
return QString::localeAwareCompare(left->creators.join(" "),
right->creators.join(" "));
default:
- return QString::localeAwareCompare(left->shortName(), right->shortName());
+ return QString::localeAwareCompare(left->shortName(),
+ right->shortName());
}
}
}
}
diff --git
a/pkg/changelog
b/pkg/changelog
index
ee7da99
..
452c95d
100644
(file)
--- a/
pkg/changelog
+++ b/
pkg/changelog
@@
-2,6
+2,7
@@
dorian (0.4.4-1) unstable; urgency=low
* Have an overlap between current/next page
* Add tool bars to list windows on Symbian
* Have an overlap between current/next page
* Add tool bars to list windows on Symbian
+ * Fix author name in libary and book info
-- Akos Polster <akos@pipacs.com> Sun, 5 Dec 2010 02:00:00 +0100
-- Akos Polster <akos@pipacs.com> Sun, 5 Dec 2010 02:00:00 +0100