File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -1233,7 +1233,6 @@ void ConfigInfoView::clicked(const QUrl &url)
1233
1233
char *data = new char [count + 1 ];
1234
1234
struct symbol **result;
1235
1235
struct menu *m = NULL ;
1236
- char type;
1237
1236
1238
1237
if (count < 1 ) {
1239
1238
qInfo () << " Clicked link is empty" ;
@@ -1243,7 +1242,6 @@ void ConfigInfoView::clicked(const QUrl &url)
1243
1242
1244
1243
memcpy (data, str.constData (), count);
1245
1244
data[count] = ' \0 ' ;
1246
- type = data[0 ];
1247
1245
1248
1246
/* Seek for exact match */
1249
1247
data[0 ] = ' ^' ;
@@ -1256,15 +1254,8 @@ void ConfigInfoView::clicked(const QUrl &url)
1256
1254
}
1257
1255
1258
1256
sym = *result;
1259
- if (type == ' s' ) {
1260
- symbolInfo ();
1261
- emit showDebugChanged (true );
1262
- free (result);
1263
- delete data;
1264
- return ;
1265
- }
1266
1257
1267
- /* URL is a menu */
1258
+ /* Seek for the menu which holds the symbol */
1268
1259
for (struct property *prop = sym->prop ; prop; prop = prop->next ) {
1269
1260
if (prop->type != P_PROMPT && prop->type != P_MENU)
1270
1261
continue ;
@@ -1273,16 +1264,13 @@ void ConfigInfoView::clicked(const QUrl &url)
1273
1264
}
1274
1265
1275
1266
if (!m) {
1276
- qInfo () << " Clicked menu is invalid:" << data;
1277
- free (result);
1278
- delete data;
1279
- return ;
1267
+ /* Symbol is not visible as a menu */
1268
+ symbolInfo ();
1269
+ emit showDebugChanged (true );
1270
+ } else {
1271
+ emit menuSelected (m);
1280
1272
}
1281
1273
1282
- _menu = m;
1283
- menuInfo ();
1284
-
1285
- emit showDebugChanged (true );
1286
1274
free (result);
1287
1275
delete data;
1288
1276
}
@@ -1731,6 +1719,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
1731
1719
list->setSelected (item, true );
1732
1720
list->scrollToItem (item);
1733
1721
list->setFocus ();
1722
+ helpText->setInfo (menu);
1734
1723
}
1735
1724
}
1736
1725
}
You can’t perform that action at this time.
0 commit comments