summaryrefslogtreecommitdiff
path: root/fbreader/fbreader-0.99.4.patch
blob: 6d6c0aec39e6322bd38257397ef076b3ebe6f303 (plain)
    1 diff -Naur fbreader-0.99.4/fbreader/desktop/desktop fbreader-0.99.4-new/fbreader/desktop/desktop
    2 --- fbreader-0.99.4/fbreader/desktop/desktop	2012-11-30 13:41:25.000000000 +0100
    3 +++ fbreader-0.99.4-new/fbreader/desktop/desktop	2018-02-19 17:21:15.232343234 +0100
    4 @@ -21,3 +21,4 @@
    5  Type=Application
    6  Icon=FBReader
    7  Categories=Office;Viewer;Literature;
    8 +MimeType=application/epub+zip;application/rtf;application/x-fictionbook+xml;application/x-zip-compressed-fb2;application/x-mobipocket-ebook;application/xhtml+xml;text/html;text/plain;
    9 diff -Naur fbreader-0.99.4/fbreader/src/formats/doc/OleStorage.cpp fbreader-0.99.4-new/fbreader/src/formats/doc/OleStorage.cpp
   10 --- fbreader-0.99.4/fbreader/src/formats/doc/OleStorage.cpp	2012-11-30 13:41:25.000000000 +0100
   11 +++ fbreader-0.99.4-new/fbreader/src/formats/doc/OleStorage.cpp	2018-02-19 17:20:53.327387155 +0100
   12 @@ -59,7 +59,7 @@
   13  		clear();
   14  		return false;
   15  	}
   16 -	static const char OLE_SIGN[] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0};
   17 +	static const char OLE_SIGN[] = {(char)0xD0, (char)0xCF, (char)0x11, (char)0xE0, (char)0xA1, (char)0xB1, (char)0x1A, (char)0xE1, 0};
   18  	if (std::strncmp(oleBuf, OLE_SIGN, 8) != 0) {
   19  		clear();
   20  		return false;
   21 diff -Naur fbreader-0.99.4/makefiles/config.mk fbreader-0.99.4-new/makefiles/config.mk
   22 --- fbreader-0.99.4/makefiles/config.mk	2012-11-30 13:41:25.000000000 +0100
   23 +++ fbreader-0.99.4-new/makefiles/config.mk	2018-02-19 17:19:25.261563732 +0100
   24 @@ -21,6 +21,7 @@
   25  ARCHIVER_LIBS ?= -lz -lbz2
   26 
   27  CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\" -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\" -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\" -DVERSION=\"$(VERSION)\"
   28 +CFLAGS += -Wno-narrowing
   29  ifeq "$(ZLSHARED)" "yes"
   30    CFLAGS += -fPIC -DZLSHARED
   31  endif
   32 diff -Naur fbreader-0.99.4/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp fbreader-0.99.4-new/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp
   33 --- fbreader-0.99.4/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp	2012-11-30 13:41:25.000000000 +0100
   34 +++ fbreader-0.99.4-new/zlibrary/ui/src/qt4/filesystem/ZLQtFSManager.cpp	2018-02-19 17:19:43.699526763 +0100
   35 @@ -48,4 +48,5 @@
   36  		static const std::string replacement = (const char*)QDir::homePath().toUtf8();
   37  	  path = replacement + path.substr(1);
   38  	}
   39 +	ZLUnixFSManager::normalizeRealPath(path);
   40  }
   41 diff -Naur fbreader-0.99.4/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp fbreader-0.99.4-new/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp
   42 --- fbreader-0.99.4/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp	2012-11-30 13:41:25.000000000 +0100
   43 +++ fbreader-0.99.4-new/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp	2018-02-19 17:21:23.657326342 +0100
   44 @@ -86,7 +86,7 @@
   45  }
   46 
   47  void QtWaitingSpinner::setRoundness(qreal roundness) {
   48 -	myRoundness = std::max(0.0, std::min(100.0, roundness));
   49 +	myRoundness = std::max(static_cast<qreal>(0.0), std::min(static_cast<qreal>(100.0), roundness));
   50  }
   51 
   52  void QtWaitingSpinner::setColor(QColor color) {
   53 @@ -148,7 +148,7 @@
   54  	qreal alphaDiff = color.alphaF() - (qreal)minAlphaF;
   55  	qreal gradation = alphaDiff / (qreal)(distanceThreshold + 1);
   56  	qreal resultAlpha = color.alphaF() - gradation * distance;
   57 -	resultAlpha = std::min(1.0, std::max(0.0, resultAlpha)); //if alpha is out of bound, force it to bounds
   58 +	resultAlpha = std::min(static_cast<qreal>(1.0), std::max(static_cast<qreal>(0.0), resultAlpha)); //if alpha is out of bound, force it to bounds
   59  	color.setAlphaF(resultAlpha);
   60  	return color;
   61  }

Generated by cgit