@@ -54,7 +54,8 @@ private slots:
5454 setContextMenuPolicy (Qt::CustomContextMenu);
5555
5656 // Disable/hide the configurator button if running windows since it's not supported
57- if (QSysInfo::productType () == " windows" )
57+ if (QSysInfo::productType () == " windows" ||
58+ QSysInfo::productType () == " osx" )
5859 {
5960 configGamepadButton->setEnabled (false );
6061 configGamepadButton->setVisible (false );
@@ -177,15 +178,13 @@ private slots:
177178 touchScreen->update ();
178179 });
179180
180-
181181 touchScreen = new TouchScreen (nullptr );
182182 settingsConfig = new ConfigWindow (nullptr , touchScreen);
183183 this ->setWindowTitle (tr (" InputRedirectionClient-Qt" ));
184184
185185 addrLineEdit->setText (settings.value (" ipAddress" , " " ).toString ());
186186 }
187187
188-
189188 void show (void )
190189 {
191190 QWidget::show ();
@@ -212,6 +211,9 @@ private slots:
212211 }
213212 touchScreen->close ();
214213 settingsConfig->close ();
214+
215+ touchScreen->setTouchScreenPressed (false );
216+ delete touchScreen;
215217 ev->accept ();
216218 }
217219
@@ -224,7 +226,7 @@ private slots:
224226 // When main window is opened, load shortcut settings
225227 void showEvent (QShowEvent* event)
226228 {
227- int id = qRegisterMetaType<ShortCut>(" ShortCut" );
229+ qRegisterMetaType<ShortCut>(" ShortCut" );
228230 qRegisterMetaTypeStreamOperators<ShortCut>(" ShortCut" );
229231
230232 QString valName = " tsShortcut0" ;
@@ -244,7 +246,7 @@ private slots:
244246 }
245247 else
246248 {
247- settings.remove (" tsShortcut" +i );
249+ settings.remove (tr ( " tsShortcut%1 " ). arg (i) );
248250 }
249251
250252 }
@@ -257,8 +259,7 @@ private slots:
257259
258260 buttons = 0 ;
259261 interfaceButtons = 0 ;
260- touchScreen->setTouchScreenPressed (false );
261- delete touchScreen;
262+
262263 delete settingsConfig;
263264 }
264265};
0 commit comments