File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -282,16 +282,18 @@ void MainWindow::restore() {
282
282
}
283
283
284
284
void MainWindow::createContextMenu (const QStringList &keys) {
285
+ appSettings->beginGroup (" providers" );
285
286
for (const auto &i : keys) {
286
287
if (!i.startsWith (" #" )) {
287
- QString url = appSettings->value (i).toString ();
288
+ auto url = appSettings->value (i).toUrl ();
288
289
contextMenu.addAction (i, [this , url]() {
289
- qDebug () << " URL is : " << url;
290
+ qDebug () << " Switching to : " << url;
290
291
webview->setUrl (QUrl (url));
291
292
});
292
293
contextMenu.addSeparator ();
293
294
}
294
295
}
296
+ appSettings->endGroup ();
295
297
}
296
298
297
299
void MainWindow::readSettings () {
@@ -327,7 +329,7 @@ void MainWindow::fullScreenRequested(QWebEngineFullScreenRequest request) {
327
329
void MainWindow::ShowContextMenu (const QPoint &pos) // this is a slot
328
330
{
329
331
QPoint globalPos = webview->mapToGlobal (pos);
330
- QAction *selectedItem = contextMenu.exec (globalPos);
332
+ contextMenu.exec (globalPos);
331
333
}
332
334
333
335
void MainWindow::parseCommand () {
You can’t perform that action at this time.
0 commit comments