MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / Load

Method Load

Plugins/WebBrowser/FrmWebBrowser.cpp:1004–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1002}
1003
1004int CFrmWebBrowser::Load(QSettings &set)
1005{
1006 if(m_pPara && m_pPara->GetOpenPrevious()) {
1007 set.beginGroup("OpenPrevious");
1008 int nCount = 0;
1009 nCount = set.value("Count", 0).toInt();
1010 int nCurrent = set.value("Current", -1).toInt();
1011 for(int i = 0; i < nCount; i++)
1012 {
1013 QString u = set.value("Url/" + QString::number(i)).toString();
1014 auto pView = CreateWindow(QWebEnginePage::WebBrowserTab);
1015 pView->load(QUrl(u));
1016
1017 QByteArray history;
1018 history = set.value("History/" + QString::number(i)).toByteArray();
1019 QDataStream d(&history, QIODevice::ReadWrite);
1020 d >> *pView->history();
1021 }
1022 if(-1 < nCurrent && m_pTab->count() > nCurrent)
1023 m_pTab->setCurrentIndex(nCurrent);
1024 set.endGroup();
1025 }
1026 return 0;
1027}
1028
1029int CFrmWebBrowser::Save(QSettings &set)
1030{

Callers

nothing calls this directly

Calls 1

GetOpenPreviousMethod · 0.80

Tested by

no test coverage detected