Web: modernize C++11
* use nullptr
This commit is contained in:
@@ -158,7 +158,7 @@ private:
|
||||
|
||||
Py::Object pyobj(obj);
|
||||
if (pyobj.isNone())
|
||||
Web::Firewall::setInstance(0);
|
||||
Web::Firewall::setInstance(nullptr);
|
||||
else
|
||||
Web::Firewall::setInstance(new Web::FirewallPython(pyobj));
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
using namespace Web;
|
||||
|
||||
Firewall* Firewall::instance = 0;
|
||||
Firewall* Firewall::instance = nullptr;
|
||||
|
||||
Firewall* Firewall::getInstance()
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ private:
|
||||
PyMem_Free(TabName);
|
||||
}
|
||||
|
||||
WebGui::BrowserView* pcBrowserView = 0;
|
||||
WebGui::BrowserView* pcBrowserView = nullptr;
|
||||
pcBrowserView = new WebGui::BrowserView(Gui::getMainWindow());
|
||||
pcBrowserView->resize(400, 300);
|
||||
pcBrowserView->setHtml(QString::fromUtf8(HtmlCode),QUrl(QString::fromLatin1(BaseUrl)));
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
PyMem_Free(TabName);
|
||||
}
|
||||
|
||||
WebGui::BrowserView* pcBrowserView = 0;
|
||||
WebGui::BrowserView* pcBrowserView = nullptr;
|
||||
pcBrowserView = new WebGui::BrowserView(Gui::getMainWindow());
|
||||
pcBrowserView->resize(400, 300);
|
||||
pcBrowserView->setWindowTitle(QString::fromUtf8(EncodedName.c_str()));
|
||||
@@ -158,7 +158,7 @@ PyMOD_INIT_FUNC(WebGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
PyMOD_Return(0);
|
||||
PyMOD_Return(nullptr);
|
||||
}
|
||||
|
||||
PyObject* mod = WebGui::initModule();
|
||||
|
||||
@@ -429,7 +429,7 @@ TYPESYSTEM_SOURCE_ABSTRACT(WebGui::BrowserView, Gui::MDIView)
|
||||
* name 'name'.
|
||||
*/
|
||||
BrowserView::BrowserView(QWidget* parent)
|
||||
: MDIView(0,parent,Qt::WindowFlags()),
|
||||
: MDIView(nullptr,parent,Qt::WindowFlags()),
|
||||
WindowParameter( "Browser" ),
|
||||
isLoading(false)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ class WebGuiExport WebView : public QWebView
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WebView(QWidget *parent = 0);
|
||||
WebView(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace WebGui {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FcCookieJar(QObject* parent = 0);
|
||||
FcCookieJar(QObject* parent = nullptr);
|
||||
virtual ~FcCookieJar();
|
||||
virtual bool setCookiesFromUrl(const QList<QNetworkCookie>&, const QUrl&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user