Skip to content

Commit

Permalink
Merge branch 'edbee:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
vadi2 authored Dec 23, 2024
2 parents ce017ad + 460028e commit bfdf393
Show file tree
Hide file tree
Showing 53 changed files with 43 additions and 3,577 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

edbee.lib:

- Autocomplete changes, setFocusPolicy on QMenu an adding `setAttribute(Qt::WA_ShowWithoutActivating)`
- Replaced qslog dependency with qlog_* macros to qDebug, qWarning etc.
- Autocomplete changes, setFocusPolicy on QMenu an adding `setAttribute(Qt::WA_ShowWithoutActivating)`
- PR #147, Add ctrl-a / ctrl-e support for macOS
- fix, Autocomplete Improvements
- autocomplete is now really canceled with the escape key. It only appears again if the word becomes blank
Expand Down
33 changes: 1 addition & 32 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)
=====================

edbee - Copyright (c) 2012-2014 by Reliable Bits Software by Blommers IT
edbee - Copyright (c) 2012-2024 by Rick Blommers

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -109,34 +109,3 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.




Qt-Components, QsLog
====================
( https://bitbucket.org/codeimproved/qslog )

Copyright (c) 2010 - 2016 Razvan Petru
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* The name of the contributors may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 1 addition & 3 deletions edbee-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(CMAKE_MACOSX_RPATH 1)

PROJECT(edbee-lib)

add_subdirectory(../vendor/qslog/ qslog)

SET(SOURCES
edbee/commands/commentcommand.cpp
edbee/commands/copycommand.cpp
Expand Down Expand Up @@ -193,7 +191,7 @@ ADD_LIBRARY(edbee-lib STATIC
${SOURCES} ${HEADERS} ${ONIG_SOURCES}
${ONIG_HEADERS})

target_link_libraries(edbee-lib QsLog ${QT_LIBS})
target_link_libraries(edbee-lib ${QT_LIBS})

set_target_properties(edbee-lib PROPERTIES AUTOMOC ON CXX_STANDARD 11)

Expand Down
1 change: 0 additions & 1 deletion edbee-lib/edbee-lib.pri
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ HEADERS += \

## Extra dependencies
##====================
include($$PWD/../vendor/qslog/QsLog.pri)
include($$PWD/../vendor/onig/onig.pri)

## Files that can usefully listed inside Qt IDE (Qt Creator, as "Other files")
Expand Down
67 changes: 33 additions & 34 deletions edbee-lib/edbee/util/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,49 @@
#pragma once

#include <QFileInfo>
#include "../vendor/qslog/QsLog.h"

#include <QDebug>

namespace edbee {
enum LogLevel {
LogLevelFatal = 1,
LogLevelCritical = 2,
LogLevelError = 3,
LogLevelWarning = 4,
LogLevelInfo = 5,
LogLevelDebug = 6,
LogLevelTrace = 7
};
}

#ifndef EDBEE_LOG_LEVEL
#define EDBEE_LOG_LEVEL edbee::LogLevel::LogLevelTrace
#endif

#define qlog_trace() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::TraceLevel ){} \
else QsLogging::Logger::Helper(QsLogging::TraceLevel).stream() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelTrace ) {} \
else qDebug() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
#define qlog_debug() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::DebugLevel ){} \
else QsLogging::Logger::Helper(QsLogging::DebugLevel).stream() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelDebug ) {} \
else qDebug() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
#define qlog_info() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::InfoLevel ){} \
else QsLogging::Logger::Helper(QsLogging::InfoLevel).stream() << QFileInfo( __FILE__).fileName() << '@' << __LINE__
if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelInfo ) {} \
else qInfo() << QFileInfo( __FILE__).fileName() << '@' << __LINE__
#define qlog_warn() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::WarnLevel ){} \
else QsLogging::Logger::Helper(QsLogging::WarnLevel).stream() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelWarning ) {} \
else qWarning() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
#define qlog_error() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::ErrorLevel ){} \
else QsLogging::Logger::Helper(QsLogging::ErrorLevel).stream() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelError ) {} \
else qError() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
#define qlog_critical() \
if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelCritical ) {} \
else qCritical() << QFileInfo(__FILE__).fileName() << '@' << __LINE__
#define qlog_fatal() \
QsLogging::Logger::Helper(QsLogging::FatalLevel).stream() << QFileInfo(__FILE__).fileName() << '@' << __LINE__

if( EDBEE_LOG_LEVEL < edbee::LogLevel::LogLevelFatal ) {} \
else qFatal() << QFileInfo(__FILE__).fileName() << '@' << __LINE__

/*
#define qlog_trace() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::TraceLevel ){} \
else QsLogging::Logger::Helper(QsLogging::TraceLevel).stream() << __FILE__ << '@' << __LINE__
#define qlog_debug() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::DebugLevel ){} \
else QsLogging::Logger::Helper(QsLogging::DebugLevel).stream() << __FILE__ << '@' << __LINE__
#define qlog_info() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::InfoLevel ){} \
else QsLogging::Logger::Helper(QsLogging::InfoLevel).stream() << __FILE__ << '@' << __LINE__
#define qlog_warn() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::WarnLevel ){} \
else QsLogging::Logger::Helper(QsLogging::WarnLevel).stream() << __FILE__ << '@' << __LINE__
#define qlog_error() \
if( QsLogging::Logger::instance().loggingLevel() > QsLogging::ErrorLevel ){} \
else QsLogging::Logger::Helper(QsLogging::ErrorLevel).stream() << __FILE__ << '@' << __LINE__
#define qlog_fatal() \
QsLogging::Logger::Helper(QsLogging::FatalLevel).stream() << __FILE__ << '@' << __LINE__
*/


#define qlog() \
QsLogging::Logger::Helper(QsLogging::InfoLevel).stream()
qInfo()


13 changes: 6 additions & 7 deletions edbee-test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
#include <QList>
#include <QTimer>

#include "../vendor/qslog/QsLog.h"
#include "../vendor/qslog/QsLogDest.h"

#include "edbee/util/test.h"
#include "edbee/edbee.h"

#define EDBEE_LOG_LEVEL edbee::LogLevel::TRACE

#include "edbee/debug.h"


Expand Down Expand Up @@ -41,10 +40,10 @@ int main(int argc, char* argv[])
//=====================

// make sure we see the QsLogging items
QsLogging::Logger& logger = QsLogging::Logger::instance();
static QsLogging::DestinationPtrU debugDestination( QsLogging::DestinationFactory::MakeDebugOutputDestination() );
logger.addDestination(std::move(debugDestination));
logger.setLoggingLevel(QsLogging::TraceLevel);
// QsLogging::Logger& logger = QsLogging::Logger::instance();
// static QsLogging::DestinationPtrU debugDestination( QsLogging::DestinationFactory::MakeDebugOutputDestination() );
// logger.addDestination(std::move(debugDestination));
// logger.setLoggingLevel(QsLogging::TraceLevel);


// Load the grammars
Expand Down
2 changes: 0 additions & 2 deletions vendor/qslog/.gitignore

This file was deleted.

118 changes: 0 additions & 118 deletions vendor/qslog/CMakeLists.txt

This file was deleted.

24 changes: 0 additions & 24 deletions vendor/qslog/LICENSE.txt

This file was deleted.

Loading

0 comments on commit bfdf393

Please sign in to comment.