[poppler] 2 commits - qt4/demos
Pino Toscano
pino at kemper.freedesktop.org
Wed Jun 3 06:21:08 PDT 2009
qt4/demos/embeddedfiles.cpp | 6 +++---
qt4/demos/fonts.cpp | 2 --
qt4/demos/info.cpp | 2 --
qt4/demos/optcontent.cpp | 2 --
qt4/demos/permissions.cpp | 2 --
qt4/demos/toc.cpp | 2 --
6 files changed, 3 insertions(+), 13 deletions(-)
New commits:
commit a87978b09a026b2db6b0f80271d87b44b336a121
Author: Pino Toscano <pino at kde.org>
Date: Wed Jun 3 13:49:56 2009 +0200
[Qt4 demo] show the checksum for embedded files
diff --git a/qt4/demos/embeddedfiles.cpp b/qt4/demos/embeddedfiles.cpp
index af26b02..22f9da7 100644
--- a/qt4/demos/embeddedfiles.cpp
+++ b/qt4/demos/embeddedfiles.cpp
@@ -58,7 +58,9 @@ void EmbeddedFilesDock::fillInfo()
m_table->setItem(i, 2, new QTableWidgetItem(QString::number(file->size())));
m_table->setItem(i, 3, new QTableWidgetItem(file->createDate().toString(Qt::SystemLocaleDate)));
m_table->setItem(i, 4, new QTableWidgetItem(file->modDate().toString(Qt::SystemLocaleDate)));
- m_table->setItem(i, 5, new QTableWidgetItem("n/a")); // ### FIXME pretty display of the HEX checksum
+ const QByteArray checksum = file->checksum();
+ const QString checksumString = !checksum.isEmpty() ? QString::fromAscii(checksum.toHex()) : QString::fromLatin1("n/a");
+ m_table->setItem(i, 5, new QTableWidgetItem(checksumString));
++i;
}
}
commit db5102842494a124d813db1696bb60820db3442b
Author: Pino Toscano <pino at kde.org>
Date: Wed Jun 3 13:21:22 2009 +0200
[Qt4 demo] remove checks for Qt >= 4.2
poppler-qt4 requires Qt 4.3, so checking for 4.2 is no more needed
diff --git a/qt4/demos/embeddedfiles.cpp b/qt4/demos/embeddedfiles.cpp
index de8119e..af26b02 100644
--- a/qt4/demos/embeddedfiles.cpp
+++ b/qt4/demos/embeddedfiles.cpp
@@ -32,9 +32,7 @@ EmbeddedFilesDock::EmbeddedFilesDock(QWidget *parent)
m_table->setHorizontalHeaderLabels(
QStringList() << tr("Name") << tr("Description") << tr("Size") << tr("Creation date")
<< tr("Modification date") << tr("Checksum"));
-#if QT_VERSION >= 0x040200
m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
-#endif
}
EmbeddedFilesDock::~EmbeddedFilesDock()
diff --git a/qt4/demos/fonts.cpp b/qt4/demos/fonts.cpp
index e0ed82b..bd342bd 100644
--- a/qt4/demos/fonts.cpp
+++ b/qt4/demos/fonts.cpp
@@ -35,9 +35,7 @@ FontsDock::FontsDock(QWidget *parent)
setWindowTitle(tr("Fonts"));
m_table->setColumnCount(5);
m_table->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Embedded") << tr("Subset") << tr("File"));
-#if QT_VERSION >= 0x040200
m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
-#endif
}
FontsDock::~FontsDock()
diff --git a/qt4/demos/info.cpp b/qt4/demos/info.cpp
index 8fa8bef..6491e0e 100644
--- a/qt4/demos/info.cpp
+++ b/qt4/demos/info.cpp
@@ -30,9 +30,7 @@ InfoDock::InfoDock(QWidget *parent)
setWindowTitle(tr("Information"));
m_table->setColumnCount(2);
m_table->setHorizontalHeaderLabels(QStringList() << tr("Key") << tr("Value"));
-#if QT_VERSION >= 0x040200
m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
-#endif
}
InfoDock::~InfoDock()
diff --git a/qt4/demos/optcontent.cpp b/qt4/demos/optcontent.cpp
index a986218..0c1015b 100644
--- a/qt4/demos/optcontent.cpp
+++ b/qt4/demos/optcontent.cpp
@@ -28,9 +28,7 @@ OptContentDock::OptContentDock(QWidget *parent)
m_view = new QTreeView(this);
setWidget(m_view);
setWindowTitle(tr("Optional content"));
-#if QT_VERSION >= 0x040200
m_view->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
-#endif
}
OptContentDock::~OptContentDock()
diff --git a/qt4/demos/permissions.cpp b/qt4/demos/permissions.cpp
index e26ba10..0ac3a57 100644
--- a/qt4/demos/permissions.cpp
+++ b/qt4/demos/permissions.cpp
@@ -35,9 +35,7 @@ PermissionsDock::PermissionsDock(QWidget *parent)
setWindowTitle(tr("Permissions"));
m_table->setColumnCount(2);
m_table->setHorizontalHeaderLabels(QStringList() << tr("Permission") << tr("Value"));
-#if QT_VERSION >= 0x040200
m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
-#endif
}
PermissionsDock::~PermissionsDock()
diff --git a/qt4/demos/toc.cpp b/qt4/demos/toc.cpp
index 7c0de9a..bf3e5cb 100644
--- a/qt4/demos/toc.cpp
+++ b/qt4/demos/toc.cpp
@@ -59,9 +59,7 @@ TocDock::TocDock(QWidget *parent)
m_tree->setAlternatingRowColors(true);
m_tree->header()->hide();
setWindowTitle(tr("TOC"));
-#if QT_VERSION >= 0x040200
m_tree->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
-#endif
}
TocDock::~TocDock()
More information about the poppler
mailing list