Changeset 871
- Timestamp:
- Jun 9, 2011, 8:17:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/util/qsystemtrayicon_pm.cpp
r856 r871 246 246 } 247 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 248 291 void QSystemTrayIconPrivate::install_sys() 249 292 { 293 294 295 250 296 Q_Q(QSystemTrayIcon); 251 297 if (!sys) { … … 308 354 } 309 355 310 template <typename T>311 inline T AssignFromVoidPtr(T &var, void *val) { var = (T)val; return var; }312 313 356 bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() 314 357 { 315 static bool tried = false; 316 if (!tried) { 317 tried = true; 318 319 // link to the xsystray DLL at runtime 320 QLibrary xsystray(QLatin1String("xsystray")); 321 322 #define R(f) if (AssignFromVoidPtr(f, xsystray.resolve(#f)) == NULL) return false 323 324 R(xstQuerySysTrayVersion); 325 R(xstAddSysTrayIcon); 326 R(xstReplaceSysTrayIcon); 327 R(xstRemoveSysTrayIcon); 328 R(xstSetSysTrayIconToolTip); 329 R(xstQuerySysTrayIconRect); 330 R(xstShowSysTrayIconBalloon); 331 R(xstHideSysTrayIconBalloon); 332 R(xstGetSysTrayCreatedMsgId); 333 R(xstGetSysTrayMaxTextLen); 334 335 #undef R 336 337 // initialize some constants 338 WM_XST_CREATED = xstGetSysTrayCreatedMsgId(); 339 MaxTextLen = xstGetSysTrayMaxTextLen(); 340 } 341 358 if (!gotApis && !resolveApis()) 359 return false; 342 360 return xstQuerySysTrayVersion(0, 0, 0); 343 361 }
Note:
See TracChangeset
for help on using the changeset viewer.