Code Monkey home page Code Monkey logo

guitools's People

Contributors

rochus-keller avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

qt-widgets tenko

guitools's Issues

Few warning fixes

When compiling EBNFStudio on Ubuntu 18.04 I fixed a few warnings see bellow:

--------------------------------- AutoMenu.cpp ---------------------------------
index acd549e..eec2f3f 100644
@@ -66,7 +66,7 @@ AutoMenu::AutoMenu(QWidget *parent, bool context)
         d_noPopup = p->d_noPopup;
     if( context )
     {
-		registerPopup();
+        registerPopup();
         d_noPopup = false;
     }
 }
@@ -77,11 +77,11 @@ AutoMenu::AutoMenu(const QString& title, QWidget *parent, bool addMenuBar)
     connect( this, SIGNAL( aboutToShow() ), this, SLOT( onShow() ) );
     if( AutoMenu* p = dynamic_cast<AutoMenu*>( parent ) )
         d_noPopup = p->d_noPopup;
-	if( addMenuBar )
-	{
-		if( QMainWindow* w = dynamic_cast<QMainWindow*>( parent ) )
+    if( addMenuBar )
+    {
+        if( QMainWindow* w = dynamic_cast<QMainWindow*>( parent ) )
         {
-			w->menuBar()->addMenu( this );
+            w->menuBar()->addMenu( this );
             d_noPopup = true;
         }
     }

-------------------------------- CodeEditor.cpp --------------------------------
index f4540d2..564a3d7 100644
@@ -188,9 +188,10 @@ private:
 };
 
 CodeEditor::CodeEditor(QWidget *parent) :
-	QPlainTextEdit(parent), d_showNumbers(true),
-    d_undoAvail(false),d_redoAvail(false),d_copyAvail(false),d_curPos(-1),
-    d_pushBackLock(false), d_noEditLock(false), d_linkLineNr(0), d_linkColNr(0),d_paintIndents(true)
+	QPlainTextEdit(parent), d_curPos(-1),d_linkLineNr(0), d_linkColNr(0),
+    d_pushBackLock(false),d_undoAvail(false),d_redoAvail(false),
+    d_copyAvail(false), d_showNumbers(true), d_noEditLock(false),
+    d_paintIndents(true)
 {
     d_charPerTab = s_charPerTab;
     d_typingLatencyMs = s_typingLatencyMs;
@@ -1100,24 +1101,22 @@ void CodeEditor::removeBreakPoint(quint32 l)
 bool CodeEditor::toggleBreakPoint(quint32* out)
 {
     int line = -1;
+    bool ret = false;
     getCursorPosition(&line);
     if( line == -1 )
         line = 0;
     if( d_breakPoints.contains(line) )
     {
         d_breakPoints.remove(line);
-        d_numberArea->update();
-        if(out)
-            *out = line;
-        return false;
     }else if( line >= 0 )
     {
         d_breakPoints.insert( line );
-        d_numberArea->update();
-        if(out)
-            *out = line;
-        return true;
+        ret = true;
     }
+    d_numberArea->update();
+    if(out)
+        *out = line;
+    return ret;
 }
 
 void CodeEditor::clearBreakPoints()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.