diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-15 20:41:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 12:54:44 +0000 |
commit | a1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch) | |
tree | 56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /vcl/unx/generic/app/sm.cxx | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'vcl/unx/generic/app/sm.cxx')
-rw-r--r-- | vcl/unx/generic/app/sm.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx index 65522c6a41c9..782cc9063b3a 100644 --- a/vcl/unx/generic/app/sm.cxx +++ b/vcl/unx/generic/app/sm.cxx @@ -141,8 +141,8 @@ public: }; SalSession * SessionManagerClient::m_pSession = NULL; -boost::scoped_ptr< ICEConnectionObserver > -SessionManagerClient::m_pICEConnectionObserver; +std::unique_ptr< ICEConnectionObserver > +SessionManagerClient::m_xICEConnectionObserver; SmcConn SessionManagerClient::m_pSmcConnection = NULL; OString SessionManagerClient::m_aClientID; bool SessionManagerClient::m_bDocSaveDone = false; // HACK @@ -403,8 +403,8 @@ void SessionManagerClient::saveDone() { if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + assert(m_xICEConnectionObserver); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); SmcSetProperties( m_pSmcConnection, nSmProps, ppSmProps ); SmcSaveYourselfDone( m_pSmcConnection, True ); SAL_INFO("vcl.sm", "sent SaveYourselfDone SmRestartHint of " << *pSmRestartHint ); @@ -414,17 +414,17 @@ void SessionManagerClient::saveDone() void SessionManagerClient::open(SalSession * pSession) { - assert(!m_pSession && !m_pICEConnectionObserver && !m_pSmcConnection); + assert(!m_pSession && !m_xICEConnectionObserver && !m_pSmcConnection); // must only be called once m_pSession = pSession; // This is the way Xt does it, so we can too: if( getenv( "SESSION_MANAGER" ) ) { - m_pICEConnectionObserver.reset(new ICEConnectionObserver); - m_pICEConnectionObserver->activate(); + m_xICEConnectionObserver.reset(new ICEConnectionObserver); + m_xICEConnectionObserver->activate(); { - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); static SmcCallbacks aCallbacks; // does this need to be static? aCallbacks.save_yourself.callback = SaveYourselfProc; @@ -489,15 +489,15 @@ void SessionManagerClient::close() { if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); + assert(m_xICEConnectionObserver); { - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); SAL_INFO("vcl.sm", "attempting SmcCloseConnection"); SmcCloseConnection( m_pSmcConnection, 0, NULL ); SAL_INFO("vcl.sm", "SmcConnection closed"); } - m_pICEConnectionObserver->deactivate(); - m_pICEConnectionObserver.reset(); + m_xICEConnectionObserver->deactivate(); + m_xICEConnectionObserver.reset(); m_pSmcConnection = NULL; } } @@ -507,8 +507,8 @@ bool SessionManagerClient::queryInteraction() bool bRet = false; if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + assert(m_xICEConnectionObserver); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, NULL ) ) bRet = true; } @@ -519,8 +519,8 @@ void SessionManagerClient::interactionDone( bool bCancelShutdown ) { if( m_pSmcConnection ) { - assert(m_pICEConnectionObserver); - osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex); + assert(m_xICEConnectionObserver); + osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex); SmcInteractDone( m_pSmcConnection, bCancelShutdown ? True : False ); } } |