[Kst] branches/work/kst/portto4/kst
Peter Kümmel
syntheticpp at gmx.net
Sat Feb 19 00:07:03 CET 2011
SVN commit 1221552 by kuemmel:
update ATHORS and also use it in the code
M +10 -1 AUTHORS
M +7 -1 cmake/src/libkstapp/CMakeLists.txt
M +16 -2 src/libkstapp/aboutdialog.cpp
--- branches/work/kst/portto4/kst/AUTHORS #1221551:1221552
@@ -1,8 +1,17 @@
-KST Developers <kst at kde.org>
+KST Developers <kst at kde.org>
C. Barth Netterfield <kst at omega.astro.utoronto.ca>
George Staikos <staikos at kde.org>
Andrew Walker <arwalker at sumusltd.com>
Rick Chern <rchern at interchange.ubc.ca>
Eli Filder <eli at staikos.net>
Mike Fenton <mike at staikos.net>
+Matthew D Truch <matt at truch.net>
+Nicolas Brisset <Nicolas.Brisset at eurocopter.com>
+Ted Kisner
+The University of British Columbia
+The University of Toronto
+Sumus Technology Limited
+Peter Kümmel <syntheticpp at gmx.net>
+Zongyi Zang
+# File must be saved as UTF8!
\ No newline at end of file
--- branches/work/kst/portto4/kst/cmake/src/libkstapp/CMakeLists.txt #1221551:1221552
@@ -4,6 +4,12 @@
kst_include_directories(kstcore kstmath kstwidgets)
-kst_add_library(STATIC)
+set(AUTHORS ${kst_dir}/AUTHORS)
+set_source_files_properties(${AUTHORS} PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE)
+file(READ ${AUTHORS} data)
+string(REPLACE "\n" ";" kst_authors ${data})
+file(WRITE ${CMAKE_BINARY_DIR}/authors.h "static const char* kst_authors = \"${kst_authors}\";\n")
+kst_add_library(STATIC ${CMAKE_BINARY_DIR}/authors.h ${AUTHORS})
+
kst_link(kstcore kstmath kstwidgets)
\ No newline at end of file
--- branches/work/kst/portto4/kst/src/libkstapp/aboutdialog.cpp #1221551:1221552
@@ -14,12 +14,14 @@
#ifdef KST_HAVE_SVN_REVISION_H
#include "svnrevision.h"
+#include "authors.h"
#endif
#include "aboutdialog.h"
#include <QDesktopServices>
#include <QDebug>
+#include <QTextEdit>
#include <QStringList>
@@ -29,6 +31,16 @@
: QDialog(parent) {
setupUi(this);
+#ifdef KST_HAVE_SVN_REVISION_H
+ QStringList utf8Authors = QString::fromUtf8(kst_authors).trimmed().split(";");
+ QStringList authors;
+ foreach(const QString& a, utf8Authors) {
+ if (!a.startsWith("#")) {
+ authors << a;
+ }
+ }
+#else
+// qmake support
QStringList authors = QStringList()
<< "Barth Netterfield"
<< "Matthew Truch"
@@ -41,10 +53,12 @@
<< "The University of Toronto"
<< "Andrew Walker"
<< "Peter Kümmel"
- << "Zongyi Zang"
- ;
+ << "Zongyi Zang";
+#endif
authors.sort();
+ authors.replaceInStrings("<", "<");
+ authors.replaceInStrings(">", ">");
authors.replaceInStrings(QRegExp("^(.*)"), "<li>\\1</li>");
QStringList msg = QStringList()
More information about the Kst
mailing list