Subversion Repositories svn1

Rev

Rev 386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 386 Rev 387
Line 8... Line 8...
8
#include <QWebEngineView>
8
#include <QWebEngineView>
9
#include <QUrl>
9
#include <QUrl>
10
#include <QAction>
10
#include <QAction>
11
#include <QDoubleSpinBox>
11
#include <QDoubleSpinBox>
12
#include <QContextMenuEvent>
12
#include <QContextMenuEvent>
-
 
13
#include <QRegularExpression>
13
 
14
 
14
class QWidget;
15
class QWidget;
15
class QPrinter;
16
class QPrinter;
16
class QmWebView;
17
class QmWebView;
17
class QPrintPreviewDialog;
18
class QPrintPreviewDialog;
Line 98... Line 99...
98
            // If the home URL has never been set
99
            // If the home URL has never been set
99
            if (homeUrl.isEmpty())
100
            if (homeUrl.isEmpty())
100
            {
101
            {
101
                // Convert URL to string and remove any tag from the end of it
102
                // Convert URL to string and remove any tag from the end of it
102
                homeUrl = url.toString();
103
                homeUrl = url.toString();
103
                homeUrl.remove(QRegExp("#.*"));
104
                homeUrl.remove(QRegularExpression("#.*"));
104
 
105
 
105
                // Set the tab name too
106
                // Set the tab name too
106
                // Just retain base file name
107
                // Just retain base file name
107
                QString name(homeUrl);
108
                QString name(homeUrl);
108
                name.remove(QRegExp(".*/"));
109
                name.remove(QRegularExpression(".*/"));
109
                name.remove(QRegExp("\\.html"));
110
                name.remove(QRegularExpression("\\.html"));
110
                QmReportWindow::setTabName(tab, name);
111
                QmReportWindow::setTabName(tab, name);
111
            }
112
            }
112
        }
113
        }
113
};
114
};
114
 
115