소스 검색

Fixed strigize

Antialize 16 년 전
부모
커밋
f11991408c
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 3
      src/docparts.cc
  2. 1 1
      wkhtmltopdf.pro

+ 4 - 3
src/docparts.cc

@@ -16,7 +16,8 @@
 #include "commandlineparser_p.hh"
 #include <QWebFrame>
 
-#define STRINGIZE(x) #x
+#define STRINGIZE_(x) #x
+#define STRINGIZE(x) STRINGIZE_(x)
 
 /*!
   Output the name and version of the program, and also whether we are using a patched qt
@@ -25,7 +26,7 @@
 void CommandLineParserPrivate::outputName(Outputter * o) const {
 	o->beginSection("Name");
 	o->beginParagraph();
-	o->text(QString("wkhtmltopdf ")+QString::number(MAJOR_VERSION)+"."+QString::number(MINOR_VERSION)+"."+QString::number(PATCH_VERSION)+(QString(STRINGIZE(BUILD)).isEmpty()?" ":"")+STRINGIZE(BUILD));
+	o->text(QString("wkhtmltopdf ")+QString::number(MAJOR_VERSION)+"."+QString::number(MINOR_VERSION)+"."+QString::number(PATCH_VERSION)+(QString(STRINGIZE(BUILD)).isEmpty()?"":" ")+STRINGIZE(BUILD));
 	o->text(", ");
 #ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
 	o->text("using wkhtmltopdf patched qt.");
@@ -258,7 +259,7 @@ void CommandLineParserPrivate::outputContact(Outputter * o) const {
   \param o The outputter to output to
 */
 void CommandLineParserPrivate::outputDocStart(Outputter * o) const {
-	o->beginSection(QString("wkhtmltopdf ")+QString::number(MAJOR_VERSION)+"."+QString::number(MINOR_VERSION)+"."+QString::number(PATCH_VERSION)+(QString(STRINGIZE(BUILD)).isEmpty()?" ":"")+STRINGIZE(BUILD) + "Manual");
+	o->beginSection(QString("wkhtmltopdf ")+QString::number(MAJOR_VERSION)+"."+QString::number(MINOR_VERSION)+"."+QString::number(PATCH_VERSION)+(QString(STRINGIZE(BUILD)).isEmpty()?"":" ")+STRINGIZE(BUILD) + "Manual");
 	o->paragraph("This file documents wkhtmltopdf, a program capable of converting html "
 				 "documents into PDF documents.");
 	o->endSection();

+ 1 - 1
wkhtmltopdf.pro

@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with wkhtmltopdf.  If not, see <http:#www.gnu.org/licenses/>.
 
-DEFINES += MAJOR_VERSION=0 MINOR_VERSION=8 PATCH_VERSION=4
+DEFINES += MAJOR_VERSION=0 MINOR_VERSION=8 PATCH_VERSION=4 BUILD=""
 
 TEMP = $$[QT_INSTALL_LIBS] libQtGui.prl
 PRL  = $$[QT_INSTALL_LIBS] QtGui.framework/QtGui.prl