[Spice-devel] [PATCH] fix typos

Hans de Goede hdegoede at redhat.com
Thu Sep 15 01:40:39 PDT 2011


ACK.

On 09/15/2011 10:34 AM, Christophe Fergeau wrote:
> applicaion =>  application
> Attache =>  Attach
> Detache =>  Detach
> _layes =>  _layers
> ---
>   client/screen.cpp       |   52 +++++++++++++++++++++++-----------------------
>   client/screen.h         |    2 +-
>   client/screen_layer.cpp |   24 ++++++++++----------
>   client/screen_layer.h   |    4 +-
>   4 files changed, 41 insertions(+), 41 deletions(-)
>
> diff --git a/client/screen.cpp b/client/screen.cpp
> index b4b640c..317618b 100644
> --- a/client/screen.cpp
> +++ b/client/screen.cpp
> @@ -239,14 +239,14 @@ void RedScreen::attach_layer(ScreenLayer&  layer)
>       RecurciveLock lock(_update_lock);
>       int order = layer.z_order();
>
> -    if ((int)_layes.size()<  order + 1) {
> -        _layes.resize(order + 1);
> +    if ((int)_layers.size()<  order + 1) {
> +        _layers.resize(order + 1);
>       }
> -    if (_layes[order]) {
> +    if (_layers[order]) {
>           THROW("layer in use");
>       }
>       layer.set_screen(this);
> -    _layes[order] =&layer;
> +    _layers[order] =&layer;
>       ref();
>       lock.unlock();
>       layer.invalidate();
> @@ -268,13 +268,13 @@ void RedScreen::detach_layer(ScreenLayer&  layer)
>
>       int order = layer.z_order();
>
> -    if ((int)_layes.size()<  order + 1 || _layes[order] !=&layer) {
> +    if ((int)_layers.size()<  order + 1 || _layers[order] !=&layer) {
>           THROW("not found");
>       }
>       QRegion layer_area;
>       region_clone(&layer_area,&layer.area());
> -    _layes[order]->set_screen(NULL);
> -    _layes[order] = NULL;
> +    _layers[order]->set_screen(NULL);
> +    _layers[order] = NULL;
>       lock.unlock();
>       invalidate(layer_area);
>       region_destroy(&layer_area);
> @@ -303,11 +303,11 @@ void RedScreen::composit_to_screen(RedDrawable&  win_dc, const QRegion&  region)
>
>   void RedScreen::notify_new_size()
>   {
> -    for (int i = 0; i<  (int)_layes.size(); i++) {
> -        if (!_layes[i]) {
> +    for (int i = 0; i<  (int)_layers.size(); i++) {
> +        if (!_layers[i]) {
>               continue;
>           }
> -        _layes[i]->on_size_changed();
> +        _layers[i]->on_size_changed();
>       }
>   }
>
> @@ -336,10 +336,10 @@ inline void RedScreen::begin_update(QRegion&  direct_rgn, QRegion&  composit_rgn,
>       region_and(&direct_rgn,&rect_rgn);
>       region_destroy(&rect_rgn);
>
> -    for (int i = _layes.size() - 1; i>= 0; i--) {
> +    for (int i = _layers.size() - 1; i>= 0; i--) {
>           ScreenLayer* layer;
>
> -        if (!(layer = _layes[i])) {
> +        if (!(layer = _layers[i])) {
>               continue;
>           }
>           layer->begin_update(direct_rgn, composit_rgn);
> @@ -348,10 +348,10 @@ inline void RedScreen::begin_update(QRegion&  direct_rgn, QRegion&  composit_rgn,
>
>   inline void RedScreen::update_done()
>   {
> -    for (unsigned int i = 0; i<  _layes.size(); i++) {
> +    for (unsigned int i = 0; i<  _layers.size(); i++) {
>           ScreenLayer* layer;
>
> -        if (!(layer = _layes[i])) {
> +        if (!(layer = _layers[i])) {
>               continue;
>           }
>           layer->on_update_completion(_update_mark - 1);
> @@ -361,10 +361,10 @@ inline void RedScreen::update_done()
>   inline void RedScreen::update_composit(QRegion&  composit_rgn)
>   {
>       erase_background(*_composit_area, composit_rgn);
> -    for (int i = 0; i<  (int)_layes.size(); i++) {
> +    for (int i = 0; i<  (int)_layers.size(); i++) {
>           ScreenLayer* layer;
>
> -        if (!(layer = _layes[i])) {
> +        if (!(layer = _layers[i])) {
>               continue;
>           }
>           QRegion&  dest_region = layer->composit_area();
> @@ -383,10 +383,10 @@ inline void RedScreen::draw_direct(RedDrawable&  win_dc, QRegion&  direct_rgn, QRe
>           region_destroy(&frame_rgn);
>       }
>
> -    for (int i = 0; i<  (int)_layes.size(); i++) {
> +    for (int i = 0; i<  (int)_layers.size(); i++) {
>           ScreenLayer* layer;
>
> -        if (!(layer = _layes[i])) {
> +        if (!(layer = _layers[i])) {
>               continue;
>           }
>           QRegion&  dest_region = layer->direct_area();
> @@ -566,10 +566,10 @@ void RedScreen::hide_cursor()
>
>   ScreenLayer* RedScreen::find_pointer_layer()
>   {
> -    for (int i = _layes.size() - 1; i>= 0; i--) {
> +    for (int i = _layers.size() - 1; i>= 0; i--) {
>           ScreenLayer* layer;
>
> -        if (!(layer = _layes[i])) {
> +        if (!(layer = _layers[i])) {
>               continue;
>           }
>
> @@ -753,21 +753,21 @@ void RedScreen::exit_modal_loop()
>
>   void RedScreen::pre_migrate()
>   {
> -    for (int i = 0; i<  (int)_layes.size(); i++) {
> -        if (!_layes[i]) {
> +    for (int i = 0; i<  (int)_layers.size(); i++) {
> +        if (!_layers[i]) {
>               continue;
>           }
> -        _layes[i]->pre_migrate();
> +        _layers[i]->pre_migrate();
>       }
>   }
>
>   void RedScreen::post_migrate()
>   {
> -    for (int i = 0; i<  (int)_layes.size(); i++) {
> -        if (!_layes[i]) {
> +    for (int i = 0; i<  (int)_layers.size(); i++) {
> +        if (!_layers[i]) {
>               continue;
>           }
> -        _layes[i]->post_migrate();
> +        _layers[i]->post_migrate();
>       }
>   }
>
> diff --git a/client/screen.h b/client/screen.h
> index 8fbc10a..a08415a 100644
> --- a/client/screen.h
> +++ b/client/screen.h
> @@ -167,7 +167,7 @@ private:
>       AtomicCount _refs;
>       std::string _name;
>       RedWindow _window;
> -    std::vector<ScreenLayer*>  _layes;
> +    std::vector<ScreenLayer*>  _layers;
>       QRegion _dirty_region;
>       RecurciveMutex _update_lock;
>       bool _active;
> diff --git a/client/screen_layer.cpp b/client/screen_layer.cpp
> index 4515be2..02abef2 100644
> --- a/client/screen_layer.cpp
> +++ b/client/screen_layer.cpp
> @@ -25,9 +25,9 @@
>   #include "application.h"
>   #include "debug.h"
>
> -class AttacheLayerEvent: public SyncEvent {
> +class AttachLayerEvent: public SyncEvent {
>   public:
> -    AttacheLayerEvent(ScreenLayer&  layer, int screen_id)
> +    AttachLayerEvent(ScreenLayer&  layer, int screen_id)
>           : _layer (layer)
>           , _screen_id (screen_id)
>       {
> @@ -40,16 +40,16 @@ private:
>       int _screen_id;
>   };
>
> -void AttacheLayerEvent::do_response(AbstractProcessLoop&  events_loop)
> +void AttachLayerEvent::do_response(AbstractProcessLoop&  events_loop)
>   {
>       Application* app = (Application*)(events_loop.get_owner());
>       AutoRef<RedScreen>  screen(app->get_screen(_screen_id));
>       (*screen)->attach_layer(_layer);
>   }
>
> -class DetacheLayerEvent: public SyncEvent {
> +class DetachLayerEvent: public SyncEvent {
>   public:
> -    DetacheLayerEvent(ScreenLayer&  _layer) : _layer (_layer) {}
> +    DetachLayerEvent(ScreenLayer&  _layer) : _layer (_layer) {}
>
>       virtual void do_response(AbstractProcessLoop&  events_loop);
>
> @@ -57,7 +57,7 @@ private:
>       ScreenLayer&  _layer;
>   };
>
> -void DetacheLayerEvent::do_response(AbstractProcessLoop&  events_loop)
> +void DetachLayerEvent::do_response(AbstractProcessLoop&  events_loop)
>   {
>       _layer.screen()->detach_layer(_layer);
>   }
> @@ -210,13 +210,13 @@ bool ScreenLayer::contains_point(int x, int y)
>       return !!region_contains_point(&_area, x, y);
>   }
>
> -void ScreenLayer::attach_to_screen(Application&  applicaion, int screen_id)
> +void ScreenLayer::attach_to_screen(Application&  application, int screen_id)
>   {
>       if (_screen) {
>           return;
>       }
> -    AutoRef<AttacheLayerEvent>  event(new AttacheLayerEvent(*this, screen_id));
> -    applicaion.push_event(*event);
> +    AutoRef<AttachLayerEvent>  event(new AttachLayerEvent(*this, screen_id));
> +    application.push_event(*event);
>       (*event)->wait();
>       if (!(*event)->success()) {
>           THROW("attach failed");
> @@ -224,13 +224,13 @@ void ScreenLayer::attach_to_screen(Application&  applicaion, int screen_id)
>       ASSERT(_screen);
>   }
>
> -void ScreenLayer::detach_from_screen(Application&  applicaion)
> +void ScreenLayer::detach_from_screen(Application&  application)
>   {
>       if (!_screen) {
>           return;
>       }
> -    AutoRef<DetacheLayerEvent>  event(new DetacheLayerEvent(*this));
> -    applicaion.push_event(*event);
> +    AutoRef<DetachLayerEvent>  event(new DetachLayerEvent(*this));
> +    application.push_event(*event);
>       (*event)->wait();
>       if (!(*event)->success()) {
>           THROW("detach failed");
> diff --git a/client/screen_layer.h b/client/screen_layer.h
> index 5ad3a11..70cd651 100644
> --- a/client/screen_layer.h
> +++ b/client/screen_layer.h
> @@ -29,8 +29,8 @@ public:
>       ScreenLayer(int z_order, bool opaque);
>       virtual ~ScreenLayer();
>
> -    void attach_to_screen(Application&  applicaion, int screen_id);
> -    void detach_from_screen(Application&  applicaion);
> +    void attach_to_screen(Application&  application, int screen_id);
> +    void detach_from_screen(Application&  application);
>
>       void set_screen(RedScreen* screen) { _screen = screen;}
>       RedScreen* screen() { return _screen; }


More information about the Spice-devel mailing list