"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/c2bUtils.h" between
cb2bib-1.9.9.tar.gz and cb2bib-2.0.0.tar.gz

About: cb2Bib is a multiplatform application for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.

c2bUtils.h  (cb2bib-1.9.9):c2bUtils.h  (cb2bib-2.0.0)
/*************************************************************************** /***************************************************************************
* Copyright (C) 2004-2018 by Pere Constans * Copyright (C) 2004-2019 by Pere Constans
* constans@molspaces.com * constans@molspaces.com
* cb2Bib version 1.9.9. Licensed under the GNU GPL version 3. * cb2Bib version 2.0.0. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution. * See the LICENSE file that comes with this distribution.
***************************************************************************/ ***************************************************************************/
#ifndef C2BUTILS_H #ifndef C2BUTILS_H
#define C2BUTILS_H #define C2BUTILS_H
#include <cb2bib_utilities.h> #include <cb2bib_utilities.h>
#include "dialog.h" #include "dialog.h"
#include <QAction> #include <QAction>
skipping to change at line 35 skipping to change at line 35
inline void displayHelp(const QString& url) inline void displayHelp(const QString& url)
{ {
openFile(url); openFile(url);
} }
inline QUrl stringToUrl(const QString& fn) inline QUrl stringToUrl(const QString& fn)
{ {
// Avoid cross-platform pitfalls regarding string to url conversions // Avoid cross-platform pitfalls regarding string to url conversions
// Avoid possible issues regarding QUrl and local files not starting with 'f ile://' // Avoid possible issues regarding QUrl and local files not starting with 'f ile://'
if (QFileInfo(fn).exists()) if (QFileInfo::exists(fn))
return QUrl::fromLocalFile(fn); return QUrl::fromLocalFile(fn);
else else
return QUrl(fn, QUrl::TolerantMode); return QUrl(fn, QUrl::TolerantMode);
} }
inline QString fromHtmlString(const QString& str, const bool addMetadata = false ) inline QString fromHtmlString(const QString& str, const bool addMetadata = false )
{ {
QTextDocument converter; QTextDocument converter;
converter.setHtml(str); converter.setHtml(str);
if (addMetadata) if (addMetadata)
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)